Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:howto_grid_base [2009/11/09 09:05]
tony
wiki:howto_grid_base [2009/11/28 08:07]
127.0.0.1 external edit
Line 109: Line 109:
 </​code>​ </​code>​
 Where the json2.js is the file downloaded from link provided above Where the json2.js is the file downloaded from link provided above
 +
 +==== Client side sorting, but server side paging ====
 +
 +In order to have this we should define two events in the grid - loadComplete and onPaging. Below is the code how can be this achieved
 +<code javascript>​
 +jQuery("#​gridid"​).jqGrid({
 +...
 +datatype: '​json',​ // can be xml
 +loadComplete : function () {
 +   ​jQuery("#​gridid"​).jqGrid('​setGridParam',​{datatype:'​local'​});​
 +},
 +onPaging : function(which_button) {
 +   ​jQuery("#​gridid"​).jqGrid('​setGridParam',​{datatype:'​json'​});​
 +},
 +...
 +});
 +</​code>​
 +In order local sorting to work properly a sorttype parameter in colModel should be set

QR Code
QR Code wiki:howto_grid_base (generated for current page)