I use jqGrid in this scenario:
The grid gets JSON data from the first URL. If the URL returns correct JSON - the grid displays that data.
If the URL returns incorrect data, then it fires the 'loadError' event of grid. In this event I want to change the URL of the grid to another URL and get the JSON data from the new URL.
Here is my code.
loadError: function(xhr, st, err) {
$("#list").setGridParam({ url: '/new_url' });
$("#list").trigger("reloadGrid");
}
But it doesnt't works. Why?