jqGrid为alertmod设置zIndex [英] jqGrid setting zIndex for alertmod

查看:211
本文介绍了jqGrid为alertmod设置zIndex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功增加了用于编辑,添加,删除和搜索选项的zIndex,但是alertmod仍处于z-index 950,使其始终落后于父模式.

I have successfully increased the zIndex for edit,add,del and search options but alertmod is still at z-index 950 making it always behind parent modal.

alertmod是单击编辑或删除但未选择任何行时的警告消息.有没有办法更改alertmod的zIndex?

alertmod is the warning message when click edit or delete without selecting any row. Is there a way to change the zIndex for alertmod?

新代码,但仍然无法正常工作...我将其以错误的顺序放置了

new code but still not working... did I place it in wrong order

$("#list-employees-grid").jqGrid('navGrid',"#list-employees-pager",{alertzIndex:3234},
  {edit:true,add:false,del:true,search:true,},
  {zIndex:1234}, //option for edit
  {zIndex:2234}, // for add
  {zIndex:3234}, // del
  {zIndex:4234, multipleSearch:true, multipleGroup:true}  // search

  );

推荐答案

在某些情况下,可以创建"alertmod".例如,如果您指的是来自navGrid的警报,则可以使用alertzIndex选项,该选项当前未记录在navGrid 该行

There are some cases where the "alertmod" can be created. For example if you mean alerts from the navGrid you can use alertzIndex option which is currently just not documented in the list of navGrid parameters. Nevertheless you can use for example the following options used by alert dialogs: alertcap, alerttop, alertleft,alertwidth,alertheight,closeOnEscape, alertzIndex. See the line of code for details.

例如,您可以将alertzIndex的默认值设置为

For example you can set default value for alertzIndex by

$.extend($.jgrid.nav, {alertzIndex: 1005});

已更新:我发布了

UPDATED: I posted the feature request which could solve the problem with the options of alert dialog in the common case.

更新2 :此功能请求已在github上的jqGrid代码中实现(请参见此处).因此,在下一版本(4.4.0之后的下一版本)中,将可以使用

UPDATED 2: The feature request is already implemented in the jqGrid code on github (see here). So in the next version (the next after 4.4.0) one will be able to use

$.extend($.jgrid.jqModal, {zIndex: 1005});

为jqGrid显示的所有警报消息设置默认值z-Index.

to set default z-Index for all alert messages shown by jqGrid.

这篇关于jqGrid为alertmod设置zIndex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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