This should re-load the grid with new source:
LoadData = function() {
var mygrid = $(“#list”)[0];
sXML = “data1data2”
if
(!mygrid.grid) {
jQuery(“#list”).jqGrid({datatype: 'xmlstring',datastr: sXML,width: 400,colNames: ['cell 1', 'cell 2'],colModel: [{ name: 'cell1', index: 'cell1', width: 75 },{ name: 'cell1', index: 'cell2', width: 190}],pager: jQuery('#pager'),rowNum: 10,rowList: [10, 50, 100], viewrecords: true,imgpath: 'themes/basic/images',caption: 'My first grid'}).navGrid('#pager', { add: true, edit: true, del: true});}
else
{ sXML = “new data1new data2”
$(“#list”).setGridParam({ datatype: 'xmlstring', datastr: sXML }).trigger(“reloadGrid”
);}}
<input type=button onclick="LoadData()" value="Re-Load Grid"