问题描述
我有一个 jquery ui 对话框,我在那个对话框上有一个 jqgrid.当我单击添加"或编辑"时,jqgrid 弹出窗口(在弹出窗口上有一个弹出窗口),它显示为输入数据 BUT ..
i have a jquery ui dialog and i have a jqgrid on that dialog. When i click Add or Edit, the jqgrid popup (to have a popup on a popup), it shows up to enter in the data BUT . .
..it 显示在 jquery UI 对话框后面(zorder 错误).无论如何要让 jqgrid 弹出窗口设置正确的 Zorder,以便此窗口显示在 jquery ui 对话框的顶部(前面),因此这是可用的.
. .it shows up behind the jquery UI dialog (the zorder is wrong). Is there anyway to have the jqgrid popup set the correct Zorder so this window shows on top of (in front of) the jquery ui dialog so this is usable.
我在下面有一个突出显示该行为的屏幕截图.
I have a screenshot below highlighting the behavior.
这是我的代码:
$(document).ready(function () {
$("#modalDialogContainer").dialog({
resizable: false,
height: 'auto',
autoOpen: false,
width: 1000,
modal: false,
buttons: {
'Close': function () {
closeModalPopup();
}
}
});
});
然后单击按钮启动 jquery ui 对话框我有这个:
then later on a button click to launch the jquery ui dialog i have this:
$("#modalDialogContainer").dialog("open");
我发现 这个链接 这似乎是有人遇到同样的问题,最后它说它已修复,但我在 jqgrid 源代码中没有看到这个.
i found this link which seems to be someone experiencing the same issue and at the end it says its fixed but i don't see this inthe jqgrid source code.
推荐答案
Z-index 解决了这个问题(正如您的评论所提到的):
Z-index fixes the problem (as your comment mentions):
http://docs.jquery.com/UI/Dialog#option-zIndex
这篇关于Z-Order 不正确 - 如果网格位于 jquery ui 对话框中,jqgrid 添加/编辑屏幕会显示在后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!