jqGrid delete action button is used to delete row.
This button click calls Edit method, it looks like it uses editurl parameter.
How to force it to call Delete method like Delete toolbar button calls ?
$(function () {
var grid = $("#grid");
grid.jqGrid({
url: '/GetData',
colModel: [{
"formatter":"actions",
"formatoptions":{"keys":true,"delbutton":true,
...
}}],
editurl: '/Edit',
});
grid.navGrid("#grid_toppager", null,null,null, { url: '/Delete' } );
});
You should include
delOptionsoption in theformatoptions:Inside of
delOptionsyou can use any from the properties and any events of the delGridRow method.