Search code examples
jqueryjqgridformclosingform-editing

JQGrid Edit Form Closing When Click Off Form


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.

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...

Thanks.


Solution

  • 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

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