Implementing Delete and Edit operations in jqgrid

后端 未结 1 1479
梦毁少年i
梦毁少年i 2020-12-22 01:05

i have the following JQgrid implementation

    colModel: [
                { name: \'NameEn\', index: \'NameEn\', width: 100, align: \'left\' },
                     


        
相关标签:
1条回答
  • 2020-12-22 01:50

    Try to use navGrid in the form

    jQuery("#grid").jqGrid('navGrid', '#pager',
        {edit: false, add: false, search: false}, {}, {},
        { // Delete parameters
            ajaxDelOptions: { contentType: "application/json" },
            mtype: "DELETE",
            serializeDelData: function () {
                return ""; // don't send and body for the HTTP DELETE
            },
            onclickSubmit: function (params, postdata) {
                params.url = '/Sector(' + encodeURIComponent(postdata) + ')/';
            }
        });
    
    0 讨论(0)
提交回复
热议问题