jqgrid自定义删除对话框消息 [英] jqgrid custom delete dialog message

查看:168
本文介绍了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自定义删除对话框消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆