locked
ListView - Limit Number of Rows RRS feed

  • Question

  • Hello,

    Is it possible to limit the number or records displayed when using a ListView?

    I'm connected to a sqldatasource.

    Thanks

    Monday, April 2, 2012 10:33 PM

Answers

  • You can check "Enable Paging" in the ListView Tasks, "Configure ListView".  A DataPager will be inserted into the layout template.  The default is 10 lines.  That can be changed by putting a PageSize attribute in the DataPager, e.g.:

    <asp:DataPager ID="DataPager1" runat="server" PageSize="12">


    • Marked as answer by rmdhawaii Monday, April 2, 2012 11:54 PM
    • Edited by KathyW2 Tuesday, April 3, 2012 12:33 AM
    Monday, April 2, 2012 11:45 PM

All replies

  • You can check "Enable Paging" in the ListView Tasks, "Configure ListView".  A DataPager will be inserted into the layout template.  The default is 10 lines.  That can be changed by putting a PageSize attribute in the DataPager, e.g.:

    <asp:DataPager ID="DataPager1" runat="server" PageSize="12">


    • Marked as answer by rmdhawaii Monday, April 2, 2012 11:54 PM
    • Edited by KathyW2 Tuesday, April 3, 2012 12:33 AM
    Monday, April 2, 2012 11:45 PM
  • Yes!!!

    That did it. i can now edit the number of records displayed.

    Thank you Kathy

    Monday, April 2, 2012 11:54 PM