I have a problem with jqGrid relaod.
So here is what I have.
when my page load i build a table
$("#systemPropList").jqGrid( { url : '${servletPath}/systemProperties.data', colNames:['Key Name','Key Value','Description','System Name','Work'], colModel : [ {name:'propertyKey',index:'propertyKey', width:155, align:'center'}, {name:'propertyValue',index:'propertyValue', width:100, align:'center'}, {name:'propertyDescription',index:'propertyDescription'}, {name:'propertySystemName',index:'propertySystemName', width:100, align:'center'}, {name:'propertyId', sortable:false, width:60, align:'center', formatter:workButtons } ], sortname: 'propertyKey', sortorder: "desc" })
I have a selection box at the top to reload this table based on the value selected from dropbox, and I linked the reload to onChange.
$("select[name=systemName]").change(function(obj){ gridReload(); }); function gridReload(){ $("#systemPropList").setGridParam({"page": 1}); $("#systemPropList").jqGrid("setGridParam",{postData:{propertySystemName : $("#systemName option:selected").val()}}).trigger("reloadGrid"); }
This works fine until I select an option for which data is available. But as soon as I select a parameter that does not have any data, the table will become empty even after the table remains empty, even if I change the selection.
I checked through firebug that there is no JS error, and the reboot makes the correct call to the server, and the server returns the data.
What am I missing?