[CLOSED] [1.0] Gridview local data paging with remote data

  1. #1

    [CLOSED] [1.0] Gridview local data paging with remote data

    Hello,

    I am using a handler to populate a sore with JsonReader.
    However on initial load of the data, the grid always displays all records on the first page.

    I added the BaseParams like explained in:

    http://forums.ext.net/showthread.php...ng-DirectEvent

    This solves the paging issue.

    But now I am unable to call the reload method on the store. There is no request made to the handler and data within the grid stays the same.

    Regards

    Bernd
    Last edited by geoffrey.mcgill; Jul 15, 2010 at 1:02 AM.
  2. #2
    Hello, BerndDA!

    The best way to call the reload method is to call it on client side. It looks something like this:

    <ext:Button runat="server" Text="Reload the store">
                                <Listeners>
                                    <Click Handler="Store1.reload();"/>
                                </Listeners>
    </ext:Button>
    You could call this method in code behind by the following way:
    
    <script runat="server">
        protected void Reload_Click(object sender, DirectEventArgs e)
        {
            Store1.Call("reload");
        }
    </script>
    
    ...
    <ext:Button runat="server" Text="Reload the store">
                                <DirectEvents>
                                    <Click OnEvent="Reload_Click"></Click>
                                </DirectEvents>
    </ext:Button>
    ...
    Please note that the code
    Store1.Call("reload");
    just creates the script
    Store1.reload();
    and pass it on client side in a separate request. So there is an unnecessary work as against to call the reload method on client side.
  3. #3
    Hi,

    I managed to get it work.
    I added the following to the store:
    <BaseParams>
                        <ext:Parameter Name="start" Value="0" Mode="Raw"  />
                        <ext:Parameter Name="limit" Value="20" Mode="Raw"  />
                        <ext:Parameter Name="dummy" Value="#{hdfDummy}.value" Mode="Raw" />
            </BaseParams>
    Everytime I want to do a fresh reload of the data, I increment the hidden field value.
    This is just a workaround and I could not track down to the real problem. But it must have something to do with the isPaging method of the store. It assumes that the store was paged on the client rather than loading server data...
    this.start = start;
    this.limit = limit;
    delete params[pn.start];
    delete params[pn.limit];
    var lastParams = this.lastParams;
    this.lastParams = params;
    Regards

    Bernd
  4. #4
    Hello, BerndDA!

    It assumes that the store was paged on the client rather than loading server data...
    Yes, if there is a local paging. The parameters "start" and "limit" are used for local (client side) paging only and it has no matter with server. The local (client side) paging operates with data which has been already loaded from anywhere to a client. If you need the remote paging you could use the parameters StartRemote and LimitRemote, an example (the names might be any as you wish). Please look at how these parameters is used in this example:
    https://examples1.ext.net/#/GridPane...h_Remote_Data/

Similar Threads

  1. Replies: 11
    Last Post: Jun 13, 2012, 4:53 PM
  2. [CLOSED] Local Paging for Remote Data Issue
    By dnguyen in forum 1.x Legacy Premium Help
    Replies: 26
    Last Post: Apr 12, 2011, 12:50 AM
  3. Replies: 4
    Last Post: Nov 11, 2010, 11:46 AM
  4. [CLOSED] Local data paging problem
    By Timur.Akhmerov in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 20, 2010, 11:33 AM
  5. [CLOSED] Export Data To Excel in Remote Paging GridPanel
    By pdcase in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 11, 2010, 8:49 PM

Posting Permissions