jqgrid增加工具栏高度

时间:2012-03-01 05:06:42

标签: java jqgrid

是否可以增加jqgrid顶部工具栏的高度? 在PC中,我可以看到按钮,然后选择确定框。 但是当在平板电脑中查看时,即IC和ios 5,按钮和选择框在底部被截断,因为高度太短或填充导致选择框和按钮显示为低位。

使用最新的jqgrid 4.3.1

<table id="gridmain"></table>
<div id="pagermain"></div>
<script src="Usergrid.js" type="text/javascript"> </script>

然后在我的js文件中: 我启用工具栏:

toolbar: [true,"top"]

然后我在顶部工具栏上添加了一些选项和按钮:

$("#t_gridmain").append("&nbsp;Status:&nbsp;");
$("#t_gridmain").append("<select name='selStatus' id='selStatus'><option value='All'>All</option><option value='InProgress' selected>InProgress</option><option value='New'>New</option><option value='Passed'>Passed</option><option value='Failed'>Failed</option><option value='Withdrawn'>Withdrawn</option></select>&nbsp;&nbsp;&nbsp;&nbsp;");
$("#t_gridmain").append("<input type='button' value='Email' id='buttEmail' style='height:20px;font-size:-4'/>&nbsp;&nbsp;&nbsp;&nbsp;");
$("#t_gridmain").append("<input type='checkbox' id='showinactive' name='showinactive'/>&nbsp;Show Inactive&nbsp;&nbsp;&nbsp;");

感谢。

2 个答案:

答案 0 :(得分:2)

我没有测试我的建议,但我想,你可以通过将height样式增加到任何更高的值作为默认值25px来解决问题:

.ui-jqgrid .ui-jqgrid-toppager {
    height: 30px !important;
}

更新:您的意思是顶部工具栏,而不是您需要更频繁使用的顶部导航工具栏

.ui-jqgrid .ui-userdata {
    height: 30px; /* default value in ui.jqgrid.CSS is 21px */
}

答案 1 :(得分:0)

$("#t_gridmain").css('height', '30px');
相关问题