Hello Abu,
I'm working on this kind of master / detail:
http://phpgrid.org/demo/demos/master-detail/multi-subgrid.php
When updating / detils detail's row, i need to reload master AND keep the row expanded.
Is there anyway to make it ?
Thanks
Mofel
You can enable grid state persistance on parent grid.
<script>
var opts = {
"stateOptions": {
storageKey: "gridState-list-sg",
columns: true, // remember column chooser settings
selection: true, // row selection
expansion: true, // subgrid expansion
filters: true, // subgrid expansion
pager: true, // page number
order: true // field ordering
}
};
</script>
<?php echo $out?>
expansion: true will give your desired work.
Hi Abu,
Thanks but when i add these js files:
<script src="//cdn.jsdelivr.net/jstorage/0.1/jstorage.min.js" type="text/javascript"></script>
<script src="//cdn.jsdelivr.net/json2/0.1/json2.min.js" type="text/javascript"></script>
<script src="//cdn.rawgit.com/gridphp/jqGridState/03b2bd484aecf8f47c810e7ba60606fe1a6fb7ec/jqGrid.state.js" type="text/javascript"></script>
I have the JS error in the console:
Uncaught TypeError: Cannot read property 'updateFilterToolbar' of undefined
at HTMLTableElement.opts.gridComplete (jqGrid.state.js:484)
at HTMLTableElement.a.updatepager (jquery.jqGrid.min.js:135)
at Y (jquery.jqGrid.min.js:68)
at Object.success (jquery.jqGrid.min.js:81)
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at x (jquery.min.js:4)
at XMLHttpRequest.b (jquery.min.js:4)
Do you have any advise about this ?
Thanks