Grid.data.update

Hello;

https://snippet.dhtmlx.com/ttlf3lbr

in that snippet i add 1000 records then i search country header filter. After searching header filter “aa1” i put code to change no to show number list automatically.

but if the records 8000 then it will stuck.

am i doing wrong? or 8k records is too much for the grid to that opration?

Please, try to use the silent updating mode:

    grid.data.forEach(function (item, index, array) {
            grid.data.update(item.id, { no: i++},true); //third parameter is "true"
            grid.paint() //repaint the grid
        });

In this case the grid won’t repaint automatically after each update() operation and you should call paint() manually after all the changes finish.
Here is the updated example:
https://snippet.dhtmlx.com/sm62plzr

1 Like