JqGrid Edit & Delete button with each row

2019-04-17 09:37发布

i m using jqgrid with mvc 3, I want to add Edit and Delete button with every row of JqGrid , i have achieved this thing by the help of this link. But it is for inline editing, i want to open a popup widows when click on edit button.

How can i achieve this thing.

Thanks

2条回答
我只想做你的唯一
2楼-- · 2019-04-17 10:12

You should just use new editformbutton: true option which exists starting with version 4.1.0 of jqGrid:

formatter:'actions',
formatoptions: {
    keys: true,
    editformbutton: true
}
查看更多
狗以群分
3楼-- · 2019-04-17 10:18

Please find the colmodel below for editing:

 {
                    name: 'EditAction',
                    width: 60,
                    fixed: true,
                    search: false,
                    sortable: false,
                    resize: false,
                    formatter: 'actions',
                    formatoptions: {
                        keys: false,
                        editbutton: true,
                        delbutton: false,
                        editformbutton: false,
                        onSuccess: function(response) {
                            if (response.status == 200) {
                            }
                        },
                        extraparam: { oper: 'edit' },
                        url: '@Url.Action("ActionName", "Controller")'
                    }
                },
查看更多
登录 后发表回答