0

How prevent reset the selection rows on jqgrid to change of page jqgrid code:

$("#jqGrid").jqGrid({
    url: 'data.json',
    datatype: "json",
    colModel: [         
        { label: 'ID', name: 'ProductID', width: 45, key: true },
        { label: 'Category Name', name: 'CategoryName', width: 75 },
        { label: 'Product Name', name: 'ProductName', width: 90 },
        { label: 'Country', name: 'Country', width: 100 },
        { label: 'Price', name: 'Price', width: 80, sorttype: 'integer' },
        // sorttype is used only if the data is loaded locally or loadonce is set to true
        { label: 'Quantity', name: 'Quantity', width: 80, sorttype: 'number' }                   
    ],
    loadonce: true,
    viewrecords: true,
    width: 780,
    height: 200,
    rowNum: 20,
    rowList : [20,30,50],
    rownumbers: true, 
    rownumWidth: 25, 
    multiselect: true,
    pager: "#jqGridPager"
});

why reset selection rows in jqgrid when i change to another page.. example: I select first row, change to next page and select first row from the second page and i try get the selected rows and only return the last..dont the all selected rows...

please maybe any suggest to fix this problem..thanks..!! note..the same error on the official example of seleccion ->CheckBox selection

official example

Diego Avila
  • 700
  • 7
  • 24
  • The solution of your problem is heavy depend on the **version** the the **fork** of jqGrid, which you use. [Free jqGrid](https://github.com/free-jqgrid/jqGrid), which I develop, has the feature. You need just add the option `multiPageSelection: true` additionally to `multiselect: true`. See [the demo](http://www.ok-soft-gmbh.com/jqGrid/OK/multiPageSelection.htm), which I created for **Updated** part of [the answer](https://stackoverflow.com/a/8172723/315935). [The old answer](https://stackoverflow.com/a/8172723/315935) describes alternative solution, which works for old jqGrid. – Oleg Sep 26 '18 at 17:04
  • This feature in Guriddo jqGid will be available in the upcoming release at end of this month – Tony Tomov Sep 26 '18 at 18:08
  • @Tony Tomov my jqGid load data from server and I'm using v 5.3.2. But its still not working. When I change to local data then its working just fine. Whats the problem so far?? – Atanu Feb 27 '19 at 12:25
  • @Atanu Did you have read what are the needed settings to do this? Please provide a example demonstrating the problem! – Tony Tomov Feb 27 '19 at 12:58

0 Answers0