Gridx / Dojo& jQuery:排序完成时是否有回调? [英] Gridx/Dojo & jQuery : Is there a callback when sorting is completed?

查看:255
本文介绍了Gridx / Dojo& 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& jQuery:排序完成时是否有回调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆