Hi there,
I’ve successfully loaded data via AJAX (see code below) to the grid and all is working well on screen.
$(“#g_users_list”)
.jqGrid(‘clearGridData’)
.jqGrid(‘setGridParam’,
{
data: r.users_list
})
.trigger(“reloadGrid”);
After loading the data via this way, the Export functions only product blank files. If I load the data via the PHP file on the server, the export functions as expected.
I’ve dug around in the source of the rendered page and can see the difference is that on the AJAX load, the “data”: [] object is empty (as I would expect), however, it appears that phpGrid is using this rather than the dynamically loaded content?
Can you please provide any insight or explain what I’m doing incorrectly?
Cheers,
Craig.
Please try “url” option to exact php page from where you are loading grid via ajax.
$opt["url"] = "<url>/<file>.php";
...
$g->set_options($opt);
If still not solved, please share online link for review. You can email me details at [email protected]