jqgrid自定义删除对话框消息 [英] jqgrid custom delete dialog message
问题描述
我想自定义删除对话框消息。基于选定的行?
我想显示类似删除所选行:$ selectedRow.columnValue?的消息。
我该怎么做?
您可以使用或 getCell 从删除行中获取一些信息。
更新:有关其他信息,请参阅答案。
I want to customize the delete dialog message. Based on a selected row? I want to display a message something like "Delete selected row: $selectedRow.columnValue? " How can i do that?
You can use beforeShowForm or afterShowForm of the delGridRow to overwrite the text of the conformation dialog.
For example
beforeShowForm: function ($form) {
$("td.delmsg", $form[0]).html("Do you really want delete the row with <b>id=" +
$("#list").jqGrid('getGridParam','selrow') + "</b>?");
}
(see the old demo) will display the confirmation dialog like the following:
You can easy modify the example to display any other information about the deleting row. You can use getRowData or getCell to get some information from the deleting row.
UPDATED: See the answer for additional information.
这篇关于jqgrid自定义删除对话框消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!