$.getScript(url) .done(function() {$( "grid" ).pqGrid( "option", "dataModel.data", data);$( "grid" ).pqGrid( "refreshDataAndView" ); });
var data = [{col1:'value1' etc...}]
.done(function()
.done(function( data )
{ type: 'button', label: "test", listener: function() { var data=[{col1:'value1'}] $( "grid" ).pqGrid( "option", "dataModel.data", data); $( "grid" ).pqGrid( "refreshDataAndView" ); }}