gpt4 book ai didi

jquery - 如何在 jqgrid 中对齐中心搜索弹出窗口

转载 作者:太空宇宙 更新时间:2023-11-03 23:44:42 24 4
gpt4 key购买 nike

我在 jqgrid 中对齐中心 Search popup 时遇到问题。当我单击 jqgrid 中的搜索按钮时,搜索弹出窗口显示在网格的开头。

$(document).ready(function(){
//jqGrid
$("#usersList").jqGrid({
url:'<%=request.getContextPath() %>/getUsersList',
datatype: "json",
colNames:['Edit','Primary Email','Active','First Name','Middle Name','LastName','Mobile Number'],
colModel:[
{name:'userId',search:false,index:'userId',width:30,sortable: false},
{name:'email',index:'user.primaryEmail',width:150},
{name:'isActive',index:'user.isActive',width:80},
{name:'firstName',index:'firstName', width:100},
{name:'middleName',index:'middleName', width:100},
{name:'lastName',index:'lastName', width:100},
{name:'mobileNo',index:'user.mobileNo', width:100},
],
rowNum:20,
rowList:[10,20,30,40,50],
rownumbers: true,
pager: '#pagerDiv',
sortname: 'user.primaryEmail',
viewrecords: true,
sortorder: "asc",
autowidth:'true',
});
$('#gridContainer div:not(.ui-jqgrid-titlebar)').width("100%");
$('.ui-jqgrid-bdiv').css('height', window.innerHeight * .65);
$('#load_usersList').width("130");
$("#usersList").jqGrid('navGrid','#pagerDiv',{edit:false,add:false,del:false},{},{},{}, {closeAfterSearch:true});
$(".inline").colorbox({inline:true, width:"20%"});
});

最佳答案

更新 ui.jqgrid.css 文件中的 .ui-jqdialog 类。

jqgrid 搜索弹出窗口通过添加 css 属性对齐中心 left: 30% !important;
顶部:40% !important;
.ui-jqdialog 类中

.ui-jqdialog {
display: none;
width: 300px;
position: absolute;
padding: .2em;
font-size: 11px;
overflow: visible;
left: 30% !important;
top: 40% !important;
}

关于jquery - 如何在 jqgrid 中对齐中心搜索弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21846860/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com