not able to call a function on pagination dojo enhancedGrid

▼魔方 西西 提交于 2019-12-02 00:50:23

Here is a dirty solution with a working jsfiddle:

http://jsfiddle.net/KbZSC/

Main code:

    grid.startup();

    var paginatorElements = dojo.query(".dojoxGridInactiveSwitch");
    paginatorElements.push(dojo.query(".dojoxGridInactived"));
    paginatorElements.push(dojo.query(".dojoxGridWardButton"));

    dojo.forEach(paginatorElements, function(element, i){
       dojo.on(element,"click",function(e){
       grid.selection.deselectAll();
       });
});

I am getting all elements involved in the pagination process and add an onclick event to each of them, which deselects all elements in the grid using

grid.selection.deselectAll();

from the other answer i posted for you.

Please be cautious with this code, as it will break if they change the classes for the paginator html elements !

You are really persistent !

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!