Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Fetch issued when removing columns with column picker

    Hi Isomorphic,

    in my application (latest 5.0p) I noticed that for some column-hiding actions, fetch requests are issued. You can reproduce in this online showcase sample.
    • Open Developer Console, show RPC requests
    • Open sample
    • One request (rows 0-75) is issued
    • Open column picker context menu
    • Hide columns country, capital
    • Another request (rows 75-216) is issued

    From reading the docs I'm pretty sure that this is related to ListGrid.setDrawAllMaxCells() and is perhaps on purpose, but I'm not sure that this was also meant to trigger fetches.

    Best regards,
    Blama

    #2
    Yes, you're right that 'drawAllMaxCells' is responsible for this and it is actually correct behavior (though we can see why it's not an obvious effect you might expect).

    Basically the drawAllMaxCells setting allows us to improve performance for relatively small grids by turning off incremental rendering and drawing the entire grid, so as the user scrolls there will be no redrawing required.
    To do this we obviously have to fetch data for every drawn row.
    In this case, by hiding columns you're reducing the total number of cells drawn in the grid to below that threshold, so we draw out the entire grid's HTML [which kicks off the fetch for the as-yet-unloaded rows' data].

    If you want to avoid this in your app, you could set drawAllMaxCells to zero to disable the feature.

    Regards
    Isomorphic Software

    Comment

    Working...
    X