문제

I am working on an ASP.net MVC Application and using jqgrid in it. I wanted to do bulk edit for my grid.

I am aware that jqgrid support inline editing,cell editing and Popupform editing .

Is there any option that sets entire jqgrid in edit mode and after making changes , save them back to data base.

Please help.

도움이 되었습니까?

해결책

You can use editRow option in loop in the loadComplete like,

$("#jQGrid").jqGrid({
    url: '../Controller/Action',
    datatype: "json",
    colNames: [...],
    colModel: [...],
     .
     .
     .
    gridview: true,
    loadonce: true,
    loadComplete: function () { 

        //just make all the row to editmode

        ids = $("#jQGrid").jqGrid('getDataIDs');
        var l = ids.length;
        for (var i = 0; i < l; i++) {
            $("#jQGrid").jqGrid('editRow', ids[i], true);
        }
    },
    rowNum: 10
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top