开发者

jqgrid : drag and drop multiple rows

How to drag and drop multiple rows using jqgrid i.e Can i drag more than 开发者_开发知识库one row?


How I know this is not possible in jqGrid. Is it supported by sortable feature of jQuery UI (see http://jqueryui.com/demos/sortable/) which are bais for the corresponding feature in jqGrid?

Moreover both "Sortable Rows" amd "Drag and Drop Rows" features of jqGrid are currently not supported if multiselect is set to true.


Set multiselect true and get selected row on gridDnD event of JQgrid.

multiselect: true

$("#jqGrid1").jqGrid('gridDnD', {

    connectWith: '#jqGrid2',

    beforedrop: function (ev, ui, getdata, $source, $target) {

        var myGrid = $('#jqGrid1');
        var i, selRowIds = myGrid.jqGrid("getGridParam", "selarrrow"), n, rowData;
        for (i = 0, n = selRowIds.length; i < n; i++) {
            rowData = myGrid.jqGrid("getLocalRow", selRowIds[i]);
        }

    },
    ondrop: function (ev, ui, getdata) {
        //CalculateItemTotal();
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜