I have a jqGrid (4.1.1) using a simple subgrid. When a record is plus-ed out to view the subgrid, a loadui different from my normal one pops up.
My current configuration is to use loadui: none
, and on the beforeRequest
event I show my own loader.
If I use my custom one on the subGridBeforeExpand
event, it shows my message as well as the default message. I also don't see where I would hide my div when loading is complete. subGridRowExpanded
doesn't seem to be the right place.
In short:
- Is there a jqGrid setting to hide the subgrid loadui, or do I have to roll my own javascript to hide it?
- Which events can I hook into to make sure the subgrid is loaded so I can close my loader?
Thanks in advance!
If you look in the code of the subgrid you could find here the place where the the loading div will be displayed just as
on the other side the code to show the standard (main) grid looks as the following (see here):
So you can see that the setting
loadui: "disable"
will be used only in the main grid. How you can see from the code above any value ofloadui
other as"enable"
or"block"
(like unknown "none" value which you use) will be interpret as theloadui: "disable"
.In my view it is a bug in the subgrid.
As the workaround I suggest you just remove the loading div after creating of jqGrid. If the table element of your grid has
id="list"
for example, then the next line:will just delete the div and you will never see it in both main grid and subgrid.
UPDATED based on the comments: OK! Now I understand your problem. I though before that you used
datatype: 'local'
. In case of the usage some remote datatype and blockUI plugin you can do the following. Theajax
call used by jqGrid for the subgrid currently you can see here. It usescomplete
event, so thesuccess
anderror
events of the jQuery.ajax are free now. So you can use the events to call.unblock()
or$.unblockUI()
methods which will close the loading overlay. You can use ajaxSubgridOptions parameter of the jqGridIf it's not solve your problem you should include in your question the code fragment which explains how you use blockUI plugin and I will modify the code by inserting the calls of unblocking methods.