jqGrid的在客户端排序 [英] jqGrid sorting on client side
问题描述
我有一个树网格自动加载NOWS。我们的目标是将电网通过树列进行排序,对上的客户端
但每次我点击排序列标题,它的问题的Ajax调用进行排序,但我需要的是在就地使用本地数据排序。
我是否有不正确电网参数或不树工作,客户端排序树列?
目前jqGrid的PARAMS的排序是有:
loadonce:真正的,//以启用客户端排序
排序:真//启用排序
要获得客户端的排序工作,我需要调用 reloadGrid
加载格后:
loadComplete:函数(){
jQuery的(#myGridID)触发(reloadGrid)。 //调用来解决客户端排序
}
而不是由电网直接检索到的数据
我没有做到这一点对我的应用程序的另一个格子,因为它被配置为使用通过其他AJAX调用检索到的数据,
editurl:clientArray
数据类型:本地
I have a 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 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
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"
这篇关于jqGrid的在客户端排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!