jqgrid custom delete dialog message(jqgrid 自定义删除对话框消息)
问题描述
我想自定义删除对话框消息.基于选定的行?我想显示类似删除选定行:$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 自定义删除对话框消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:jqgrid 自定义删除对话框消息


- 失败的 Canvas 360 jquery 插件 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 400或500级别的HTTP响应 2022-01-01