问题:主要确认窗口显示在jqGrid的灰色区域后面

时间:2011-01-26 13:17:17

标签: jquery css jqgrid

打开网格时,背景会变暗。当我选择删除某些行时,会显示删除确认,但它会显示在灰暗的背景中:即网格仍在前面,而删除确认则应该在前面。这背后的原因是什么?

$("#termsGrid").jqGrid('navGrid','#termsGridPager',
    {edit:false,add:false,del:true,search:true,view:true,refresh:true}, 
    // edit options 
    {},
    // add options
    {},
    //del options
    {
        msg: "Selected records(s) will be permanently deleted and cannot be recovered.<br/> Are you sure?",
        afterSubmit : gridAfterSubmit,
        reloadAfterSubmit: true,
        closeOnEscape:true
    },
    // search options
    {multipleSearch:true,closeOnEscape:true},
    //view options
    {
        closeOnEscape:true
    }
);

2 个答案:

答案 0 :(得分:1)

听起来像是一个CSS问题。

尝试使用适当的z-index-value调整样式表以确认消息。这些可能是绝对的,如果你没有定义正确的顺序(使用z-index),这可能会导致你的问题。

如果您在查找正确的类/ ID或样式值方面遇到问题,请将FirebugFirefox一起使用。

答案 1 :(得分:0)

您可以尝试更改(增加)“删除”对话框的“z-index”CSS属性。要通过定义其他Del选项来执行此操作

beforeShowForm: function(form) {
    form.closest(".ui-jqdialog").css({"z-index":"3000"});
}

此处值3000可以设置为任何其他值。 jqGrid使用的默认值是950。