单击关闭表单时JQGrid编辑表单关闭 [英] JQGrid Edit Form Closing When Click Off Form

查看:154
本文介绍了单击关闭表单时JQGrid编辑表单关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望这是一个简单的问题。在JQGrid表单编辑模式下,编辑表单会弹出屏幕中间进行编辑。当我点击表单时,就像在背景区域一样,表单关闭就像我点击取消一样。我知道我可以使用onClose事件来捕捉这个,但我想知道除非你点击取消按钮,否则我告诉网格不要关闭。如果你点击表格,我希望编辑表格留在那里,如果你点击取消就关闭。

hopefully this is a simple question. In the JQGrid form edit mode, the edit form pops up in the middle of the screen for editing. When I click off of the form, like on the background area, the form closes like I clicked "cancel". I know I can use the "onClose" event to catch this, but I am wondering how I tell the grid not to close unless you click the "cancel" button. I want the editing form to stay there if you click off the form, just close if you click cancel.

我想我有点懒,我不我真的想创建一个模态对话框,每次收到onClose事件时弹出该对话框并询问用户是否真的想要停止编辑......

I guess I am being a bit lazy, I don't really want to create a modal dialog box that pops up every time it receives the onClose event and asks the user if they really want to stop editing...

谢谢。

推荐答案

看起来你可以让jqGrid用jqModal构建对话框,然后你应该能够指定jqModal选项不关闭单击叠加层时的模态。请参阅此页面上的模态选项: http://dev.iceburg.net/jquery/ jqModal / #how

Looks like you can have jqGrid build the dialog with jqModal, and then you should be able to specify the jqModal option to not close the modal when you click the overlay. See the "modal" option on this page: http://dev.iceburg.net/jquery/jqModal/#how

编辑您可以在加载jqModal库时在jqGrid表单设置中指定模态选项。

edit you can specify the "modal" option in your jqGrid form setup when the jqModal library is loaded.

这篇关于单击关闭表单时JQGrid编辑表单关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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