jQgrid Inside jQuery simple modal problems with z-

2019-09-08 00:06发布

问题:

I put jQGrtid inside jQuery simple model dialog. z-index of simple dialog is 950 so i changed the z-index of jqGrid edit/add/delete pupups greater that that because otherwise they appearing below simple modal.

.jqmID1 { z-index: 1000 !important; }
.jqmID2 { z-index: 1000 !important; }
.jqmID3 { z-index: 1000 !important; }

All was looking good but than if i click/close "edit" and than click/clase "add" and than back to "edit" jQGrid popup again displaying below simple modal.

Than i find out than each time .jqmIDn increasing the n value for each new opening popup so my fix working only for 3 first popups ant than when value getting increased .jqmID4 .jqmID5 .... in is not working

Is there anything i can do to fix that? should i change jQgrid.js somewhere?

UPDATE:

OK, as a solution to that I've found a way how to change z-index in simple modal instead, so i decrease it like that:

$("#myDiv").modal({

   ...
   zIndex: 800,
   ...
});

If someone have any another ideas let me know

回答1:

You can use zIndex property of the Add and Edit Dialog. See this and this answers for details.