I got a grid, with checkboxes plugin and Pagination.
I can get selected rows only for the current page I’m at, but not of all the rows. How one can do that?
I search the code, tried finding the global array slickgrid is taking the selected rows when it enters a new page (dataView.syncGridSelection(grid, true)), but didn’t manage doing so till now…
Thanks for any help.
You can subscribe to the
onPagingInfoChangedevent – which gets triggered when you navigate to a new page – then store the selected rows from that page into a global array for your reference.Note: further to what you mentioned, the
grid.getSelectedRows()returns the row number relative to the visible rows. So rows on page 2 will start with 0. I would advise to instead get theidof the row and store that in the global array instead (you know, the one each row in the dataview should have and which is unique).Hope this gives you a start. Let me know if this helps!