Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7528793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:28:46+00:00 2026-05-30T04:28:46+00:00

So I created this ListView user control in VB, and specified my data source.

  • 0

So I created this ListView user control in VB, and specified my data source. The layout I used is “single row” layout and the paging is enabled. However, the result is exactly 10 columns (10 windows) for the row. I’m wondering how could I make the default column to be 5? I checked the properties and there seems to be no such property that controls how many columns to start with for the row.

Thanks

Edit: code for reference

<asp:ListView ID="ListView1" runat="server" DataSourceID="RssDataSource1">
        <ItemTemplate>
            <td runat="server" style="background-color:#DCDCDC;color: #000000;">
                title:
                <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                <br />
                link:
                <asp:Label ID="linkLabel" runat="server" Text='<%# Eval("link") %>' />
                <br />
                description:
                <asp:Label ID="descriptionLabel" runat="server" 
                    Text='<%# Eval("description") %>' />
                <br />
                pubDate:
                <asp:Label ID="pubDateLabel" runat="server" Text='<%# Eval("pubDate") %>' />
                <br />
                category:
                <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                <br />
            </td>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <td runat="server" style="background-color:#FFF8DC;">
                title:
                <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                <br />
                link:
                <asp:Label ID="linkLabel" runat="server" Text='<%# Eval("link") %>' />
                <br />
                description:
                <asp:Label ID="descriptionLabel" runat="server" 
                    Text='<%# Eval("description") %>' />
                <br />
                pubDate:
                <asp:Label ID="pubDateLabel" runat="server" Text='<%# Eval("pubDate") %>' />
                <br />
                category:
                <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                <br />
            </td>
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            <table style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">
                title:
                <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                <br />
                link:
                <asp:TextBox ID="linkTextBox" runat="server" Text='<%# Bind("link") %>' />
                <br />
                description:
                <asp:TextBox ID="descriptionTextBox" runat="server" 
                    Text='<%# Bind("description") %>' />
                <br />
                pubDate:
                <asp:TextBox ID="pubDateTextBox" runat="server" Text='<%# Bind("pubDate") %>' />
                <br />
                category:
                <asp:TextBox ID="categoryTextBox" runat="server" 
                    Text='<%# Bind("category") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
            </td>
        </InsertItemTemplate>
        <LayoutTemplate>
            <table runat="server" border="1" 
                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </table>
            <div style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                <asp:DataPager ID="DataPager1" runat="server">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                            ShowNextPageButton="False" ShowPreviousPageButton="False" />
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                            ShowNextPageButton="False" ShowPreviousPageButton="False" />
                    </Fields>
                </asp:DataPager>
            </div>
        </LayoutTemplate>
        <EditItemTemplate>
            <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                title:
                <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                <br />
                link:
                <asp:TextBox ID="linkTextBox" runat="server" Text='<%# Bind("link") %>' />
                <br />
                description:
                <asp:TextBox ID="descriptionTextBox" runat="server" 
                    Text='<%# Bind("description") %>' />
                <br />
                pubDate:
                <asp:TextBox ID="pubDateTextBox" runat="server" Text='<%# Bind("pubDate") %>' />
                <br />
                category:
                <asp:TextBox ID="categoryTextBox" runat="server" 
                    Text='<%# Bind("category") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
            </td>
        </EditItemTemplate>
        <SelectedItemTemplate>
            <td runat="server" 
                style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                title:
                <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                <br />
                link:
                <asp:Label ID="linkLabel" runat="server" Text='<%# Eval("link") %>' />
                <br />
                description:
                <asp:Label ID="descriptionLabel" runat="server" 
                    Text='<%# Eval("description") %>' />
                <br />
                pubDate:
                <asp:Label ID="pubDateLabel" runat="server" Text='<%# Eval("pubDate") %>' />
                <br />
                category:
                <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                <br />
            </td>
        </SelectedItemTemplate>
    </asp:ListView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:28:48+00:00Added an answer on May 30, 2026 at 4:28 am

    I found out that the default number of records to be shown can be specified in the pager control:

    asp:DataPager ID=”DataPager1″ runat=”server” PageSize=”5″

    combined with GroupItemCount property, the problem is solved. Thanks all for the help anyways.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created this layout of successive text input fields, 1- Enter data into empty
I created a user control which contains a ListView with a custom ItemsPanelTemplate. <UserControl
i have created listview as follows... lv = (ListView) findViewById(R.id.listview); lv.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_checked, mDisplay));
I have a user control which is having a listview inside it. The SelectionChanged
I have created a user control to handle adding comments to certain business entities,
I use following GUI setup: ListView activity CursorAdapter that feeds this list Layout for
ListView menuList = (ListView) findViewById(R.id.ListView_Menu); String[] items = {getResources().getString(R.string.menu_item_NxtInc)}; ArrayAdapter<String> adapt = new ArrayAdapter<String>(this,R.layout.menu_item,items);
I have created a custom listview that is populated using a row.xml file. Each
I created this program: #include <iostream> #include <fstream> using namespace std; int main ()
I have created this code, and when I run it, don't get any errors

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.