Grid applies paging only after scrolling to the next page

  1. #1

    Grid applies paging only after scrolling to the next page

    Hi there, this is supposed to be easy but I can't get it right, I'm binding a GridView with a DirectMethod, I load a DataTable and assign it to the GridView Store, then I bind the store, it works fine but it shows all the results instead of the paging limit which is 25 however if I scroll to the next page, #2, the paging is applied correctly, then I can return to page #1 and it will display only 25 rows.
    Any ideas?
    Thank you

    Grid
    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="15" />
                    </BottomBar>
    Code:
    DataTable Results = new DataTable();
                Results.Load(Dr);
    
    
                StoreContacts.DataSource = Results;
                StoreContacts.DataBind();
  2. #2
    Hi,

    Please add for the Store:
    
    <BaseParams>
        <ext:Parameter Name="start" Value="0" Mode="Raw" />
        <ext:Parameter Name="limit" Value="15" Mode="Raw" />
    </BaseParams>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please add for the Store:
    
    <BaseParams>
        <ext:Parameter Name="start" Value="0" Mode="Raw" />
        <ext:Parameter Name="limit" Value="15" Mode="Raw" />
    </BaseParams>
    Hi Daniil, I added that but it didn't work, the only way that limits the results on the first page is to flip to the next page and future queries will be fixed as well, if I don't flip to the next page all queries will display all rows in the first page, that's really strange isn't it?

    <Store>
                        <ext:Store ID="StoreContacts" runat="server" WarningOnDirty="false" OnRefreshData="StoreContacts_Refresh">
                            <Reader>
                                <ext:JsonReader IDProperty="cnt_id">
                                    <Fields>
                                        <ext:RecordField Name="cnt_id" />
                                        <ext:RecordField Name="cnt_name" />
                                        <ext:RecordField Name="cnt_address" />
                                        <ext:RecordField Name="cnt_city" />
                                        <ext:RecordField Name="cnt_phone" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                            <BaseParams>
                                <ext:Parameter Name="start" Value="0" Mode="Raw" />
                                <ext:Parameter Name="limit" Value="15" Mode="Raw" />
                            </BaseParams>
                        </ext:Store>
                    </Store>
  4. #4
    I think I was wrong - there should <AutoLoadParams> instead of <BaseParams>.
  5. #5
    Quote Originally Posted by Daniil View Post
    I think I was wrong - there should <AutoLoadParams> instead of <BaseParams>.
    yey!!!! thank you

Similar Threads

  1. Replies: 2
    Last Post: Dec 22, 2011, 2:45 PM
  2. [CLOSED] \IE 6 scrolling bug in portlet page.
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 14, 2011, 9:25 PM
  3. Virtual scrolling and paging
    By vs.mukesh in forum 1.x Help
    Replies: 0
    Last Post: Apr 12, 2011, 8:51 AM
  4. Replies: 0
    Last Post: Jan 13, 2011, 10:55 AM
  5. Can we load gridpanel (Datagrid) while scrolling page using..
    By Satyanarayana murthy in forum Open Discussions
    Replies: 0
    Last Post: Jul 27, 2009, 2:11 AM

Posting Permissions