tags:

views:

119

answers:

0

Hi!

I uses jqgrid in this scenario:

  1. Grid gets JSON data from first url. If url returns correct JSON - grid displays that data.

  2. If url returns incorrect url, thet fires 'loadError' event of grid. In this event i want to change url of grid to url2 fnd get JSON data from thus new url.

Here is my code.

loadError: function(xhr, st, err) {
 $("#list").setGridParam({ url: '/new_url' });
        $("#list").trigger("reloadGrid");
}

But it doesnt't works.