I want to create a custom message without using the modal popup in jqgrid. Is there a way to disable it? Or is there a way to change the contents of the modal?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
Can you be more specific? If you want your own modal dialog, you could just add an event handler (on an Edit button, for example) that when fired will open your own custom dialog. You can use the jQuery UI dialog for this purpose, and just have it open to your own custom form.
Update After inspecting the jqGrid source code,
info_dialog
is the function that is used to display this particular dialog. There is a separate call to display the "Loading..." popup. Offhand there does not seem to be a simple way to disableinfo_dialog
. However, you could modify the jqGrid source to accomplish what you need. You could either:Return immediately from
info_dialog
- which may be extreme because it could report other errors you need - or,Find and comment out the call that is displaying this particular ajax error. There is some trial-and-error involved, but with only 18 calls to this function it will not take you long to track down. In fact, start by commenting out this instance, since it is called from the
error
function of an ajax call:info_dialog(a.jgrid.errors.errcap,e.status+" : "+e.statusText+"<br/>"+u,a.jgrid.edit.bClose);
Obviously such a modification is a last resort, but once it works you might consider rolling a patch for the jqGrid team to disable the alert.
I know this is out of the topic, but have you tried SlickGrid http://wiki.github.com/mleibman/SlickGrid/examples.
Search for div.loadingui div.msgbox { ... } somewhere in css files. I think editing this css class will get the job done.
Yes you can do it. you can make visible property to false [
$("#info_dialog").visible(false);
] of the modal box, and you can call what ever your custom modal box.i have changed the z-index of modal popup on runtime once you can access to it you can do any customization
Also, if you can do it on another place if you have server response such as error