Results 1 to 2 of 2

Thread: Dynamically adjust scrolling in a memory-store based grid (FINITE scrolling)

  1. #1

    Default Dynamically adjust scrolling in a memory-store based grid (FINITE scrolling)

    I am trying to use grid (Ext.grid.Panel) to present data from a memory-based store. Honestly, what a developer has to go through in order to achieve basic scrolling in Ext grid is highly ridiculous.

    A lot of discussions go about infinite scrolling for potentially large data sets obtained from elsewhere. That's not what I need. We deal with relatively small data sets (20-100 rows) stored in memory, so we're not concerned about paging or performance at all. We always know total record count upfront and just want to load up entire set into the grid at once, without any paging or delayed loading. In other words, regular finite scrolling.

    I achieve limited success in that using buffered store with 'memory' proxy similar to this (per this complete example) and verticalScroller: 'paginggridscroller'

        var store = Ext.create('', {
            pageSize: 50,
            buffered: true,
            purgePageCount: 0,
            model: 'Employee',
            proxy: {  type: 'memory'  }
    That works fine when the store is bound to the grid initially during grid creation (by passing store: config). However, troubles begin when I try to change data in the store, or switch the store itself. Specifically, vertical scroll bar remains the same as when the grid was first created.
    For example, if I delete a bunch of rows so that scrolling is no longer necessary, scroll bar looks like before - as if the grid still has more rows than the screen fits. Same when I replace the store, or add records. There seems to be no way to tell the grid to recalculate scroll bar.

    So basically I want grid to recalculate vertical scroll bar when the number of rows in the underlying store changes, automatically or programmatically. Oh, and I am stuck with version 4.0.7, unfortunately.

    Here's what I tried so far in all combinations (none of which helped):
    • grid.reconfigure() with or without store - data changes, scroll bar does not
    • using store.removeAt() and manipulating .data property in store directly
    • - makes no difference whatsoever compared to regular memory proxy
    • store.pagemap.clear() - this method is not yet in 4.0.7
    • grid.determineScrollbars() - no effect
    • grid.showVerticalScroller() - no effect
    • invalidateScrollerOnRefresh - no effect

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    In the 4.0.x branch the scrolling in the grid was a virtual scroller which didn't work the best. We revamped the scrolling in 4.1.x so my only suggestion is to bit the bullet and upgrade.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:

    Posts are my own, not any current, past or future employer's.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts