0

I'm familiar wit the trick to overwrite the modal behavior:

$.extend($.jgrid, {
showModal : function(h) {
    h.w.show("blind");
},
closeModal : function(h) {
    h.w.hide("blind").attr("aria-hidden", "true");
    if(h.o) {h.o.remove();}
}
});

I'm also looking for a way to change the color of that same modal header. (I don't want to change the color for the entire .ui-widget-header, just for that particular modal window). Can I achieve that using "h.w.css" of some kind?

This is how how open this modal:

$(nameOfGrid).jqGrid('searchGrid', {
                multipleSearch:true,
                showQuery: true,
                multipleGroup:true,
                caption: "Advanced Search",
                sFilter: "afilters",
                Find: "Apply",
                Reset: "Reset & Close",
                closeAfterReset: true,
                closeAfterSearch: false,
                searchOnEnter: true,
                width:'auto',
                recreateForm: true,
                recreateFilter: false,
                errorcheck: true,
                overlay:false,

Thanks,

4

1 回答 1

1

创建模态对话框,您可以向标题添加其他类。搜索对话框标题的 id 将由前缀searchhdfbox_和网格 id 构成。因此,您可以执行以下操作

var $grid = $(nameOfGrid);

// create the Searching Dialog
$grid.jqGrid('searchGrid', {...});

// add the class "ui-state-error" to the dialog header
$("#searchhdfbox_" + $.jgrid.jqID($grid[0].id)).addClass("ui-state-error");
于 2015-04-06T11:14:17.220 回答