jqGrid。 onSortComplete 事件是否可用?
我想弄清楚,这个插件是否可以使用像“onSortComplete”这样的事件。 jqGrid 已经有事件“onSortCol”,该事件在对某些特定列进行排序之前引发,并且它不适合我。 我已经尝试使用事件“gridComplete”来解决此问题,但该事件几乎在每次网格操作后都会引发。 (例如添加新行)。
有人有解决办法吗?
预先感谢,伊万。
Im trying to figure out, if some event like 'onSortComplete' is available for this plugin. jqGrid already have event 'onSortCol', which is raised BEFORE sorting of some particular column, and it is not suitable for me.
I have already tried to use event 'gridComplete' to work around this, but this event is raised almost on after each action with grid. (e.g. adding new Row).
Does anybody have any solutions?
Thanks in advance, Ivan.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果开始排序,网格包含将从服务器或本地数据重新加载。所以排序的结束是在网格被加载并填充之后。所以使用
loadComplete
或gridComplete
是正确的方法。如果您需要区分排序结束和网格的其他刷新,您只需在onSortCol
内部设置一个变量,您始终在loadComplete
或gridComplete
中清除该变量代码>.这样您就可以在排序结束时执行一些操作。If sorting is started the grid contain will be reloaded from the server or from the local data. So the end of sorting is after the grid will be loaded and filled. So the usage of
loadComplete
orgridComplete
is the correct way. If you need distinguish between end of sorting and other refreshing of the grid you can just set a variable inside ofonSortCol
which you clear always inloadComplete
orgridComplete
. In the way you would be able to do some actions at the end of sorting.