Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating a single cell (not the entire row) in slickgrid with DataView

I have a slickgrid (using a DataView) that I'm using to display rapidly changing values. As far as I know, when a value changes in the underlying model, the only choice I have is to update the entire row:

dataView.updateItem(rowId, rowData);

Unfortunately, even if certain values haven't changed (i.e. I'm only updating one cell's value in the entire row), slickgrid repaints the entire row (I'm using the Chrome dev tools to see what is being rendered).

I also have a < table > implementation of the same UI and here I'm able to paint individual cells (or groups of cells) that update, and rendering is roughly 3x as fast. It's not exactly apples-to-apples, but I would like to be able to limit the amount of painting that occurs if possible, considering on any given update, generally only one or two cells (on a long row of data) have changed.

like image 252
ricklane Avatar asked Oct 02 '22 22:10

ricklane


1 Answers

You could use

slickGrid.updateCell(row, cell);
like image 137
kavun Avatar answered Oct 07 '22 15:10

kavun