Error with the Paging Toolbar?

  1. #1

    Error with the Paging Toolbar?

    I'm having the same problem that appears here https://examples1.ext.net/#/GridPane...ON_WebService/ and here https://examples1.ext.net/#/GridPane...ML_WebService/

    In the examples above when I click on the "next page" icon in the paging toolbar after first going to the example, the data shown is the second page, but the page number shown is 11. If I then click on the "next page" icon again, the page number shown is 111. If when it first shows 11 I click on the "prev page" icon, then it goes back to 1. From then on, it works fine.

    I get the same problem in my application except that it goes to 101 the first time I click on the "next page" instead of 11 as in the examples above.

    How can this be fixed?

    Thanks in advance.

    O
  2. #2
    Hi,

    Thanks for the report.

    A mode of "start" and "limit" parameters must be Raw.
    <AutoLoadParams>
        <ext:Parameter Name="start" Value="0" Mode="Raw" />
        <ext:Parameter Name="limit" Value="5" Mode="Raw" />
    </AutoLoadParams>
    We will fix it in the online samples.
  3. #3
    Thank you.

    Problem fixed here.

    O
  4. #4

    Add Params to PagingToolbar

    I struggled with this for a long time, trying to get it to work with the params in the AutoLoadParams of the Store. As it turns out, if the params start and limit are put in the PaginToolbar then the paging back and forth works.

                        <ext:Store 
                            ID="StoreEventLog" 
                            runat="server" 
                            AutoLoad="true" 
                            RemotePaging="false"
                            OnRefreshData="StoreEventLog_RefreshData">
                             <Proxy>
                                <ext:PageProxy />
                            </Proxy>
                            <Reader>
                                <ext:JsonReader>
                                    <Fields>
                                        <ext:RecordField Name="LogID" Mapping="LogID" />
                                        <ext:RecordField Name="PanelDateGMT" Mapping="PanelDateGMT" />
                                        <ext:RecordField Name="PanelDate" Mapping="PanelDate" />
                                        <ext:RecordField Name="MessageID" Mapping="MessageID" />
                                        <ext:RecordField Name="ID1" Mapping="ID1" />
                                        <ext:RecordField Name="ID2" Mapping="ID2" />
                                        <ext:RecordField Name="ID1Data" Mapping="ID1Data" />
                                        <ext:RecordField Name="ID2Data" Mapping="ID2Data" />
                                        <ext:RecordField Name="UserID" Mapping="UserID" />
                                        <ext:RecordField Name="PanelID" Mapping="PanelID" />
                                        <ext:RecordField Name="PanelData" Mapping="PanelData" />
                                        <ext:RecordField Name="SiteID" Mapping="SiteID" />
                                        <ext:RecordField Name="OtherInfo" Mapping="OtherInfo" />
                                        <ext:RecordField Name="ID3" Mapping="ID3" />
                                        <ext:RecordField Name="ID3Data" Mapping="ID3Data" />
                                        <ext:RecordField Name="ID4" Mapping="ID4" />
                                        <ext:RecordField Name="ID4Data" Mapping="ID4Data" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                             <BaseParams>
                                <ext:Parameter Name="start" Value="0" Mode="Value" />
                                <ext:Parameter Name="limit" Value="100" Mode="Value" />
                            </BaseParams>
                            <AutoLoadParams>
                            </AutoLoadParams>
                        </ext:Store>
                    </Store>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="100" StoreID="StoreEventLog" DisplayMsg="Total: {2}">
                          <ParamNames>
                                <ext:Parameter Name="start" Value="0" Mode="Value"/>
                                <ext:Parameter Name="limit" Value="100"  Mode="Value"/>
                          </ParamNames>
                        </ext:PagingToolbar>
                    </BottomBar>
  5. #5
    Hi @Juls,

    Please start a new forum thread on the Premium Help forum (we can miss a thread in other forums).

    If you feel the threads are related, please feel free to cross link between two ones.
  6. #6
    Quote Originally Posted by Daniil View Post
    Hi,

    Thanks for the report.

    A mode of "start" and "limit" parameters must be Raw.
    <AutoLoadParams>
        <ext:Parameter Name="start" Value="0" Mode="Raw" />
        <ext:Parameter Name="limit" Value="5" Mode="Raw" />
    </AutoLoadParams>
    We will fix it in the online samples.
    how i can do this in code behind whit .load() method?

    in .cs file i have

    public void GetLista(object sender, DirectEventArgs e)
        {
            string cosa = e.ExtraParams["id"];
    
            lista.Call("load", new JRawValue("{ url: '/magazzino/ListaDiluiteca.ashx', params: { start: '0',limit: '20', query: '" + cosa + "'}, nocache: true}"));
            
            albero.SelectNode(cosa);
            
        }
    but pagination number is "11" or "0202" etc...
    Pagination works in page load.

    Thank!
  7. #7
    ok, my solutions:

    in code behind i have to simple string:
    public void GetLista(object sender, DirectEventArgs e)
    {
            string cosa = e.ExtraParams["id"];
            lista.Call("load", new JRawValue("{ url: '/magazzino/ListaMagazzino.ashx', params: { query: '" + cosa + "'}, nocache: true}"));
    
    }
    whithout baseparam (start and limit).
    Last edited by maurox; Mar 12, 2012 at 3:36 PM.
  8. #8
    Quote Originally Posted by maurox View Post
    how i can do this in code behind whit .load() method?

    in .cs file i have

    public void GetLista(object sender, DirectEventArgs e)
        {
            string cosa = e.ExtraParams["id"];
    
            lista.Call("load", new JRawValue("{ url: '/magazzino/ListaDiluiteca.ashx', params: { start: '0',limit: '20', query: '" + cosa + "'}, nocache: true}"));
            
            albero.SelectNode(cosa);
            
        }
    but pagination number is "11" or "0202" etc...
    Pagination works in page load.
    The start and limit parameters should have integer values, not strings.
  9. #9
    Quote Originally Posted by maurox View Post
    in code behind i have to simple string:
    public void GetLista(object sender, DirectEventArgs e)
    {
            string cosa = e.ExtraParams["id"];
            lista.Call("load", new JRawValue("{ url: '/magazzino/ListaMagazzino.ashx', params: { query: '" + cosa + "'}, nocache: true}"));
    
    }
    whithout baseparam (start and limit).
    If you don't need to use BaseParams, it means you use local paging. And really, local paging doesn't require the start and limit parameters to be set up in BaseParams. PagingToolbar PageSize is enough in local paging case.

Similar Threads

  1. Replies: 11
    Last Post: Jun 13, 2012, 4:53 PM
  2. Problem with paging toolbar
    By sonnh11 in forum 1.x Help
    Replies: 3
    Last Post: May 10, 2011, 12:08 PM
  3. Paging ToolBar Problem
    By kiran malgi in forum 1.x Help
    Replies: 2
    Last Post: Mar 29, 2010, 8:25 AM
  4. paging toolbar on extjs
    By [WP]joju in forum 1.x Help
    Replies: 4
    Last Post: Oct 22, 2009, 8:21 AM
  5. paging toolbar caching
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Oct 20, 2009, 9:36 AM

Posting Permissions