views:

2268

answers:

1

I have tree-grid with autoloading nows. The goal is to sort the grid by tree column, right on client side.

But each time I click on sort column header, it issues ajax call for sorting – but all I need is on-place sorting using the local data.

Do I have incorrect grid parameters or tree doesn't work with client-side sorting on tree column?

Current jqgrid params for sorting are are:

loadonce: true, // to enable sorting on client side
sortable: true //to enable sorting
+3  A: 

To get client-side sorting to work, I needed to call reloadGrid after the grid was loaded:

loadComplete: function() {
    jQuery("#groups").trigger("reloadGrid"); // Call to fix client-side sorting
}

I did not have to do this on another grid in my application because it was configured to use data retrieved via another AJAX call, instead of data retrieved directly by the grid:

editurl: "clientArray"
datatype: "local"
Justin Ethier