[CLOSED] pagination issue

  1. #1

    [CLOSED] pagination issue

    Hi Guys,
    I think I might have found a bug in the latest SVN code.
    I have just updated and rebuilt Coolite library and then I tried using the following code:

    <asp:ObjectDataSource ID="SearchDataSource" runat="server" SelectMethod="GetCustomerList" TypeName="DB.Customers" OnSelected="SearchDataSource_Selected">
        <SelectParameters>
            <asp:Parameter Name="CountryCode" />
            <asp:Parameter Name="Keyword" />
            <asp:Parameter Name="Start" Type="Int32" />
            <asp:Parameter Name="Limit" Type="Int32" />
            <asp:Parameter Name="SortField" />
            <asp:Parameter Name="SortDir" />
            <asp:Parameter Name="count" Direction="Output" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    <ext:Store ID="SearchStore" runat="server" AutoLoad="true" RemoteSort="true" DataSourceID="SearchDataSource" OnRefreshData="SearchStore_RefreshData">
      <AutoLoadParams>
          <ext:Parameter Name="Start" Value="={0}" />
          <ext:Parameter Name="Limit" Value="={20}" />
      </AutoLoadParams>
    And it didn't work, displaying the pagination info as: "Displaying records NaN - NaN of 8000"

    but as soon as I removed the AutoLoadParams and added this to the PageLoad:

    if (!IsPostBack)
    {
        SearchDataSource.SelectParameters["Start"].DefaultValue = "0";
        SearchDataSource.SelectParameters["Limit"].DefaultValue = "20";
    }
    it worked fine
  2. #2

    RE: [CLOSED] pagination issue

    Hi alexp,

    Please note that AutoLoadParams applied only once during first autoload request.
    If you use PagingToolbar then with next request will be used parameters from PagingToolbar. Please note that the names of params from PagingToolbar are 'start' and 'limit' (lowercase)


    Please see the following sample which demonstrates paging with ObjectDataSource (it use DataSourceProxy also, which reuired if you want to perform server-side paging in page):

    https://examples1.ext.net/#/GridPane...g_and_Sorting/




Similar Threads

  1. [CLOSED] Is there a way to achieve pagination in TreeGrid
    By Aparna_B in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 08, 2011, 12:12 PM
  2. GridPanel Pagination Issue
    By anulall in forum 1.x Help
    Replies: 3
    Last Post: Aug 09, 2011, 9:53 AM
  3. [CLOSED] Facebook Pagination Style.
    By farisqadadeh in forum 1.x Legacy Premium Help
    Replies: 22
    Last Post: Apr 19, 2011, 9:07 AM
  4. Row expander with pagination
    By 78fede78 in forum 1.x Help
    Replies: 0
    Last Post: Jul 06, 2010, 3:56 PM
  5. [CLOSED] Persist selection over pagination
    By methode in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 30, 2008, 11:38 AM

Posting Permissions