[CLOSED] Filtering buffered data in GridPanel with Infinitive Scrolling

  1. #1

    [CLOSED] Filtering buffered data in GridPanel with Infinitive Scrolling

    Hi,

    I'm back to Ext.net and upgrading some web applications from 3.3 to 5.0.

    About one change I have a question: how to replace the BufferedRenderer plugin.

    In 3.3:

    Plugins>
    <ext:FilterHeader ID="FilterHeader1" runat="server"  />
    <ext:BufferedRenderer ID="BufferedRenderer1" runat="server" LeadingBufferZone="10" TrailingBufferZone="20"   />
    </Plugins>
    I removed the BufferedRenderer plugin and added to the Store:

    Buffered="true"
    PageSize="200"
    TrailingBufferZone="10"
    LeadingBufferZone="10"
    following the example:

    https://examples5.ext.net/#/GridPane...ling/Overview/

    The gridpanel also includes a FilterHeader plugin combined with StringFilters in ComboBox columns.
    But the filtering is not working anymore. It used to work with the plugin in version 3. When I remove the Buffered option from the Store than the filtering is working.

    What should I use? And what is the impact on performance?
    BufferedRenderer="true" in GridPanel (default value?)
    or
    Buffered="true" in the Store (with TrailingBufferZone and LeadingBufferZone)

    And why is the filtering not working when applying Buffered="true" in the Store?


    Thanks,

    Hans

    PS: I'm using the Community Forum. I can not add a post to the Premium Forum. Will I get access to the Premium Forum with my new Ext.Net 5 Pro License?
    Last edited by fabricio.murta; Sep 26, 2019 at 6:38 PM.
  2. #2
    I moved your thread to the Premium forum and your account has been upgraded to a Premium member.

    We will investigate your original question and post a response soon.
    Geoffrey McGill
    Founder
  3. #3
    Hello @HansWapenaar!

    If you add buffered="True" you are applying another kind of Buffered store; in which data is selectively pulled from the server. In that aspect, filters applied to the store will only filter whatever is currently loaded to the store.

    Given you upgraded a previous version that was using just the buffered renderer mechanism, that is, all raw data in the store; and drawn to the page's DOM as you scroll around, you have all data in the store you need to filter, so local filter worked.

    When you changed the store to buffered, you would also need to change the filters to remote, that is, the filters would be passed to the data fetch query, and the server will provide filtered (and paged) data to the store. So further logic would be necessary.

    I believe if you want to just keep 3.x behavior, all you have to do is drop the BufferedRenderer plug in, and let the default play. If you don't change the store query logic, and it gets all data from server at once, then there's no buffered store at all.

    Is that clear enough? I'm making several guesses from what you provided; if you had buffered store before, and have the corresponding queries set up and in place, there may be something wrong in the server communication/queries, or the filters not being passed at all. If that's the case, I believe we'd better handle it if you can draw a focused test case of how you are trying to set the grid up, and we can advise how to fix the specific issues with the implementation.

    If that's the case, here's some guidelines on posting code samples that may come in handy; basing your sample off available examples in our examples explorers can be a good start too.

    - Tips for creating simplified code samples
    - More Information Required
    - Forum Guidelines

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  4. #4
    Hi Fabricio,

    Thanks for your quick response.

    I'm upgrading two different applications which contain the bufferedrenderer plugin. One with and one without the filters.

    For the one with the filters, as you suggested, just removing the plugin works ok. Datasets contain up to 5.000 records only, so performance is still fine. No difference with version 3.

    For the application without the filters I will apply the buffered store. Dataset is much bigger there. Data is read through a JsonPProxy. May be, when I have some more time, I will look at the option of the RemoteFilter. I realize that also sorting won't work then and has to be implemented through RemoteSorting. Checked it in the example and also there sorting on a column doesnot work:
    https://examples5.ext.net/#/GridPane...ling/Overview/

    Hans
  5. #5
    Hello Hans!

    Quote Originally Posted by HansWapenaar
    For the one with the filters, as you suggested, just removing the plugin works ok. Datasets contain up to 5.000 records only, so performance is still fine. No difference with version 3.
    Yes, the performance should be similar at least; after all, the grid is still buffered, so the load in the browser is light just the same, rows are only (graphically) drawn to the grid as they are about to be shown in the scrolling.

    Quote Originally Posted by HansWapenaar
    For the application without the filters I will apply the buffered store. Dataset is much bigger there. Data is read through a JsonPProxy.
    You get it very quickly! That's it; the proxy implementation should be carrying out the filter and sort, so the server provides the "page" (or the segment of data) with the contents according to the criteria.

    You may want, though, to try the big-data approach letting it load all data at once; maybe you can still get acceptable performance even with lots of data (say, 100,000 records), all loaded client-side; it depends on the "target audience" (browsers, computer processing power on the clients, and data bandwidth). After all, with buffered rendering (not buffered store), the whole data is still stored as a simple array and only the necessary "chunk" of data is actually rendered to the grid.

    I have expanded the Simple GridPanel Example to allow an arbitrary amount of entries, and up to 100,000 records, I still get snippy performance and very low data traffic footprint (the 100k entries reports as just 40kB data in Chrome network monitor, 8MB uncompressed). Well, a single pixel moved in the scrollbar handler means some hundred records, so paging is advised to improve user experience.

    If you get a really long scrollbar you may need to fix an eventual issue, we have it (as well as workaround) logged in issue #1680, just in case. But really, if you get that far on scrolling, you should consider paging or at least filtering. :)

    Anyway, believing you could get the code the way you need it, I'm marking this as closed. Please let us know if you need further assistance with this thread.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] buffered scrolling + selected rows + filtering
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 13, 2014, 8:47 AM
  2. [CLOSED] Buffered Grid Scrolling repeats rows
    By jwhitmire36 in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Feb 09, 2013, 5:49 AM
  3. [CLOSED] Buffered Grid with filtering and editing
    By jchau in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 13, 2013, 6:39 AM
  4. Replies: 5
    Last Post: Dec 14, 2012, 5:07 PM
  5. [CLOSED] Buffered Grid View Scrolling
    By bethc in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 02, 2009, 7:29 AM

Posting Permissions