I have a Grid containing a subGrid. Both grids have a Checkbox column. When I click on the parent checkbox, it automatically checks / deselects all the checkboxes of the subheadings. All flags are mapped to DB values, so every time the status changes, it changes the value in the database and I reload the grid to update the status of the flags.
The problem is that when I reinstall the grids, I lose the extended sub-series, which is very annoying, because every time I click on the checkbox, it reloads the grids ...
Is there a way to keep the status of which row is used up when reloading grids?
Here is part of my codes:
$('#jqgSearchTaxPayer').jqGrid({ .... subGrid: true, subGridRowExpanded: function (sendSubGrid, lineId) { var sendSubGridId; sendSubGridId = sendSubGrid + "_t"; $("#" + sendSubGrid).html("<table id='" + sendSubGridId + "' class='scroll'></table>"); $("#" + sendSubGridId).jqGrid({ .... { name: 'Keep', index: 'Keep', width: '9px', align: 'center', editable: true, edittype: 'checkbox', formatter: function (cellvalue, options, rowObject) { cellvalue = cellvalue + ""; cellvalue = cellvalue.toLowerCase(); var bchk = " checked=\"checked\""; if (cellvalue == "false") { bchk = ""; } return "<input type='checkbox' onclick=\"SendLineChecked('" + options.rowId + "','" + sendSubGrid + "');\" " + bchk + " value='" + cellvalue + "' offval='no' />"; }, formatoptions: { disabled: false } }], ....
Thanks in advance for your help!
Lotux source share