How to properly attach event to “close dialog” for “columns chooser” of jqGrid?

无人久伴 提交于 2019-12-01 09:17:41

You can use the following code

tableWrap.jqGrid (
    'navButtonAdd',
    '#pager',
     {
         caption: "", buttonicon: "ui-icon-calculator", title: "choose columns",
         onClickButton: function() {
             tableWrap.jqGrid('columnChooser', {
                     done: function(perm) {
                         if (perm) {
                             tableWrap.jqGrid("remapColumns", perm, true);
                             alert("The column chooser closed with 'OK' button");
                         } else {
                             alert("The column chooser closed with 'Cancel' button");
                         }
                     }
                 }
             );
        }
     });

See the demo

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