I have a problem with Jqgrid, I have two grids on one page, and onclick in the row of the first grid you need to reload the second grid.
I am 100% sure that the second grid is configured correctly if I manually pass in the hard code that it fills correctly.
The reboot function does not work. Please help someone. Below is the jquery code for both grids
$(document).ready(function() { jQuery("#list2").jqGrid({ url:'classes/ListServices.php', datatype: "json", mtype: 'POST', colNames: ['Id','Description', 'Details', 'Cost in (R)'], colModel: [ {name:'Id',index:'Id', align:"center", width:30}, {name:'Description',index:'Description', align:"center"}, {name:'Details',index:'Details', align:"left"}, {name:'Cost',index:'Cost',align:"center",width:30,formatter:'currency'}, ], width: 780, height: 100, rowNum:18, pager: '#pager1', loadonce: true, sortname: 'id', viewrecords: true, sortorder: "asc", caption:"Services List", multiselect: false, onSelectRow: function(ids) { if(ids == null) { ids=0; if(jQuery("#list3").jqGrid('getGridParam','records') >0 ) { jQuery("#list3").jqGrid('setGridParam', {url:"subgrid.php?q=1&id="+ids,page:1}); jQuery("#list3").jqGrid.trigger('reloadGrid'); } } else { jQuery("#list3").jqGrid('setGridParam', {url:"subgrid.php?q=1&id="+ids,page:1}); jQuery("#list3").jqGrid.trigger('reloadGrid'); } } }); jQuery("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,multipleSearch:true}); jQuery("#list2").jqGrid('filterToolbar', {stringResult: true,searchOnEnter : false}); jQuery("#list3").jqGrid({ url:'classes/ListServicesDetails.php?Id=2', datatype: "json", mtype: 'POST', colNames: ['Id','ServiceId', 'Description', 'Details', 'Cost in (R)'], colModel: [ {name:'Id',index:'Id', align:"center", width:30}, {name:'ServiceId',index:'ServiceId', align:"center", width:30}, {name:'Description',index:'Description', align:"center"}, {name:'Details',index:'Details', align:"left"}, {name:'Cost',index:'Cost',align:"center",width:30,formatter:'currency'}, ], width: 780, height: 200, rowNum:18, pager: '#pager2', loadonce: true, sortname: 'id', viewrecords: true, sortorder: "asc", caption:"Services Details List", multiselect: false, onSelectRow: function(id) { alert(id); } }); jQuery("#list3").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,multipleSearch:true}); });
Please, if someone can help me ...
thank