0

I am able to select all the rows in a page by clicking on selectall checkbox. But I am unable to select all the rows across all the pages. Is it possible?

Earth
  • 3,477
  • 6
  • 37
  • 78
  • 1
    Do those rows even exist in the DOM at the time? If not then no, you can't select something that isn't there. What are you trying to accomplish here? – David Jun 08 '16 at 10:09
  • My requirement is to have a `select all rows` checkbox or button. After clicking this, I need to select all the rows in all the pages at a time. Then, in the same page, another button is present for displaying those selected rows details in the another page. Only thing, I need is to select all the records in all the pages(paging)..Thanks. – Earth Jun 08 '16 at 10:16
  • So you just need a button which, when clicked, takes the user to a page where every record is displayed. Seems like the part about selecting the records isn't entirely necessary. – David Jun 08 '16 at 10:18
  • But when paging, it should behave accordingly..If selected all clicked, the page viewed should be selected all the records.. – Earth Jun 08 '16 at 10:21
  • I can't believe your username was available at all. Let alone just eight months ago. – Clint B Jun 08 '16 at 11:33

1 Answers1

0

The answer on your question depend on many aspects of the implementation. You should specify which datatype you use (for example datatype: "local"), which version of jqGrid you use and from which fork of jqGrid (free jqGrid, commercial Guriddo jqGrid JS or an old jqGrid in version <=4.7).

I develop free jqGrid fork and I have implemented multiPageSelection: true option, described in the answer. See the demo. The new option allows to set the ids of the rows, which need be selected in selarrrow option of jqGrid. It allows "pre-select" the rows. Moreover it changes the behavior of "Select All" checkbox too.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798