Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
53
rated 0 times [  55] [ 2]  / answers: 1 / hits: 48445  / 15 Years ago, mon, january 25, 2010, 12:00:00

I have a tree-grid with autoloading rows. 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 an Ajax call for sorting, but all I need is on-place sorting using the local data.



Do I have incorrect grid parameters or doesn't tree 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

More From » jquery

 Answers
16

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



loadComplete: function() {
jQuery(#myGridID).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

[#97754] Wednesday, January 20, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katharinek

Total Points: 302
Total Questions: 105
Total Answers: 123

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
;