Search code examples
extjsextjs3

EXT3 JS Grid - Change a specific JsonStore Value before rendering and ordering


I want to append an int to a specific cell in the grid - this needs to happen before rendering and ordering so that the user sees the correct ordering

This is for a league table.

I have bene through several iterations of conver - renderer - record.push etc Clue seems to be to copy the store and use a new one in the grid when the value has been changed

Any help on this appreciated.

Ian


Solution

  • could do something similar to the following:

    var grid, gridStore, tempStore;
    
    gridStore = new Ext.data.Store();
    tempStore = new Ext.data.Store();
    grid = new Ext.grid.GridPanel({
        store: gridStore
    });
    tempStore.addListener("load", function (store, records) {
        //make your modifications to the records (concat the int)
    
        gridStore.loadData(/*some results*/);
    });