【发布时间】:2012-07-17 18:41:22
【问题描述】:
所以我找到了一些很好的修复方法,可以将确认删除、编辑、查看等对话框 here 居中。但是,如果在网格上没有选择行,则会出现一个不同的对话框,其中显示一个简单的“警告:请选择行”。除了这个对话框的语法很糟糕之外,我似乎找不到任何方法来处理这个对话框的事件,以便我可以根据需要重新定位。
我为我能找到的 navGrid 中的每个事件添加了处理程序,并使用 BugZilla 来查看它是否会在任何这些事件上停止但无济于事。 When rows are selected, it will fire the delete event fine.想法?以下是我的代码:
$('#sessionGrid').jqGrid({...}).navGrid('#sessionPager', {
add: false,
edit: false,
del: true,
search: false,
closeOnEscape: true
}, {
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}
}, {
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}
}, {
caption: "Delete",
msg: "Delete the selected sessions?",
bSubmit: "Delete",
bCancel: "Cancel",
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}
}, {
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}
}, {
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}
});
【问题讨论】:
标签: jquery asp.net-mvc jqgrid