My grid (in dataView) contains a field "num", which shows the row number. When I delete a row, the row numbers are no longer contiguous. So I need to update this field for all rows to have a contiguous numbering. (like in Excel, if you delete data in row 5, row number 5 doesn't disappear - only data shifts).
Question : How do I mass-update this field for all rows? (if there is a quicker alternative - please let me know).
For this particular case, you can leverage the row indexing used by the grid to dynamically render the row numbers via the formatter column option. (SlickGrid Examples)
The following code provides delete capability with dynamic row numbering. One important consideration is the use of a
slick.dataview
which requires batching for multi-row deletes.