jqGrid: is there an event for when columns are reordered?

前端 未结 7 2304
走了就别回头了
走了就别回头了 2021-02-09 15:09

I\'m using the column reordering feature in jqGrid

$grid = jQuery(\"#list\").jqGrid({
    sortable:true,
    ...
});

Is there an event that fir

7条回答
  •  南旧
    南旧 (楼主)
    2021-02-09 15:32

    Found after reading Mr W's reply and experimenting a bit, there's a better way of doing things:

    $("#gbox_" + gridid).bind("sortstop", function(){
        // you can even get the current permutation!
        // Yes, it looks like you may be grabbing the remapColumns function.
        //    You're not, you get an array of integers back.
        grid.jqGrid("getGridParam", "remapColumns");
    })
    

    Enjoy!

提交回复
热议问题