JQGRID – maintain check box selection state – page refresh / redirect / reload

The implementation of selection over multiple pages of the grid is very tricky in old versions of jqGrid. I posted the answer, the answer (try the demo) with the corresponding implementations.

On the other side the scenario of selection of multiple rows over multiple pages is very common. Thus I implemented new feature in free jqGrid. Now one can just use new multiPageSelection: true option in combination with multiselect: true. It changes the behavior of selection in the following way:

  • one can use selarrrow array to pre-select some rows directly during creating the grid.
  • the array selarrrow can hold the ids of rows from other pages. The array selarrrow will be not cleared on changing the page. jqGrid just select rows if it’s rowid is in the array selarrrow.
  • click on “Select All” checkbox in the header of checkbox columns fills selarrrow with all rowids of local data (from all pages)

The demo demonstrates the new feature.

Leave a Comment