1
votes

I am heavily using jqGrid on a web page, using local data (array of data) The grid is having hundreds of rows (maybe up to 300 rows), and around 40 columns.

And there is a requirements that the user when click a button, it will update one columns for all rows. so which is faster? using setCell and call it for all rows? or update the back data, and do reloadgrid? our application is going to be used by hundreds of users.

1

1 Answers

1
votes

I'm sure that reloading of modified data should be much quickly as typical update of 300 cells with respect of setCell. The web browser have to make reflow of the whole grid or the whole page on update of one cell. So it's expensive not just updating of cells, but the consequences of the update (the reflow). So I would recommend you to use reloadGrid. I'm sure that you use gridview:true option (if you don't want to make the page in many many times slowly).

In general it would be possible to implement much more quick changes of multiple cells of grid. In the case one would need to temporary detach the grid from the page (see "Out-of-the-flow DOM Manipulation" part here), make the modifications and restore the grid on the original place. The way would be tricky and I'm not sure that you could use setCell in the case.