I had a jqGrid that was working perfectly with complex searches, and then it inexplicably stopped updating the grid values after submitting a search filter.
I have NetBeans PHP IDE setup as a debugging environment and I can confirm that the data is being correctly returned from the search but the grid never refreshes?
To be honest I don't know what next to do... the data is being correctly delivered as XML after running the search query but the grid never displays it?
I've included the jqGrid JavaScript code below in case it might provide a clue...
Just to reiterate it was working perfectly and now it isn't. The data is being returned correctly, (confirmed in NetBeans), Oh and I have a deadline in two days :(
Any suggestions would be much appreciated.
jQuery(document).ready(function()
{
jQuery.getJSON(InitGridUrl, function(MetaData)
{
var colNames=new Array(), colModel=new Array();
var ColWidth = jQuery('#grid').width() / ObjectCount(MetaData['Structure']);
var LastModified = new Date(MetaData['LastModified'] * 1000);
jQuery.each(MetaData['Structure'], function(FieldTypeId, Field)
{
colNames.push(Field['Name']);
colModel.push({name:Field['Name'], index:Field['Field'], width:ColWidth, align:Field['Align'], sortable:true});
});
jQuery("#grid").jqGrid
({
url: 'http://localhost/base/_resource/Widgets/jqGrid/getdata.php',
datatype: 'xml',
mtype: 'GET',
colNames:colNames,
colModel :colModel,
pager: '#pager',
rowNum:20,
rowList:[10,20,30,40,50],
sortname: colModel[0]['index'],
sortorder: 'desc',
viewrecords: true,
gridview: true,
caption: MetaData['Title'] + ' [Last Modified: ' + LastModified.toLocaleString().split(' GMT')[0] + ']',
altclass: 'AltRowClass',
altRows: true,
height: 400,
width:"auto",
rownumbers: true
});
jQuery("#grid").jqGrid('navGrid','#pager', {edit:false,add:false,del:false}, {}, {}, {}, {multipleSearch:true, multipleGroup:true, showQuery:true} );
});
});