【问题标题】:How to append delurl with more parameters for jqgrid?如何为 jqgrid 添加更多参数的 delurl?
【发布时间】:2017-09-05 15:39:22
【问题描述】:

在我选择一个复选框并按下删除按钮后,我想发送一个带有参数 oper=del&id=123&projType='software'&projNum='111' 的 POST url projInfoOperate.do。这些参数值应该是选中行的单元格值。

目前,只有oper=del&id=123 可以传递给服务器。如何附加其他参数?我试过deldata,它没有用。 jqgrid如何实现?

欢迎提出任何建议。提前致谢!

jQuery("#grid-table").jqGrid(
{
    //...
    colModel : [{
                    name : 'projType',
                    index : 'projType'
                },
                {
                    name : 'projSerialNum',
                    index : 'projSerialNum',
                    key : true
                }, 
                {
                    name : 'projNum',
                    index : 'projNum'
                }, 
                {
                    name : 'remark',
                    index : 'remark'
                }],
    multiselect : true,
    multiboxonly : true,
    shrinkToFit:false,   
    autoScroll: true,
    editurl : "projInfoOperate.do"
});

jQuery(grid_selector).jqGrid(
    'navGrid',
    pager_selector,
    { //navbar options
        edit : false,
        editicon : 'icon-pencil blue',
        edittext : "Edit",
        editurl : "projInfoOperate.do",
        del : true,
        delicon : 'icon-trash red',
        deltext : "Delete",
        delurl : "projInfoOperate.do",
    },
    {
        url : "projInfoOperate.do",
        recreateForm : true,
        delData : {

         }
});

【问题讨论】:

    标签: jquery jqgrid jqgrid-formatter


    【解决方案1】:

    你可以试试这个

      delData: {
                        projType: function () {
    
                            return 'software' ;
                        },
    
                        projNum: function () {
    
                            return '111' ; 
    
                        }
                    },
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-09
      • 1970-01-01
      • 2021-03-13
      相关资源
      最近更新 更多