Reputation: 29427
I have setup in jqGrid a delete function call that uses the native features for checking if a row have been selected in the grid or not as in the following code sample:
$("#myGrid").jqGrid('navGrid', '#pager',
{ add: true, addtitle: 'Add record',
edit: true, edittitle: 'Edit record',
del: true, deltitle: 'Delete record',
addfunc: addFulfilment, editfunc: editFulfilment
},
{}, // default settings for edit
{}, // default settings for add
{
// define settings for Delete
mtype: "post",
reloadAfterSubmit: false,
onclickSubmit: function (rp_ge, postdata) {
rp_ge.url = '/Customer/Delete/' + postdata;
}
},
{}, // search options
{}
);
This works fine showing a confirm message before the delete method get called.
Is there a way to customize the delete message that appear on the popup window?
Upvotes: 2
Views: 6794
Reputation: 221997
You can set $.jgrid.del.msg
or redefine other parameters from the localization file like grid.locale-en.js:
del : {
caption: "Delete",
msg: "Delete selected record(s)?",
bSubmit: "Delete",
bCancel: "Cancel"
},
You can overwrite some parameters only for one grid using additional prmDel
option of the navGrid with the same name (msg
for example). Inside of navGrid the default values $.jgrid.del
will be combined with the current prmDel
options.
Upvotes: 6