本文介绍了Gridx/Dojo& amp; jQuery:排序完成后是否存在回调?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此表是使用NodeWebkit中的GridX/dojo生成的. "[BV] [B] [V]"是jQuery使用类选择器处理的链接.但是,一旦我对网格进行了排序,侦听器便会解除绑定.如何重新应用点击功能?排序&时是否有回调渲染完成了吗?
This table is generated using GridX / dojo in NodeWebkit. The "[BV][B][V]" are links that are handled by jQuery using class selector. However, once I sort the grid, the listeners are unbinded. How do I reapply the click function? Is there a callback when sorting & rendering is complete?
推荐答案
在gridx中完成排序时,我不知道有回调或事件.
There is no callback or event that I know of when sorting is complete in gridx.
但是,在对整个网格进行排序或过滤时会重新渲染整个网格.因此,您可以使用类似以下内容的
However, the whole grid is re-rendered when it is sorted or filtered. So you can use something like:
grid.connect(grid.body, 'onRender', function(){
$(document).on("click", "a.myBVlink", function() {
...
});
$(document).on("click", "a.myBlink", function() {
...
});
$(document).on("click", "a.myVlink", function() {
...
});
});
这篇关于Gridx/Dojo& amp; jQuery:排序完成后是否存在回调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!