是否可以在jqgrid中对齐网格列标题?例如对齐左右还是中心?
在jqrid文档http://www.trirand.com/jqgridwiki/doku.php?id=wiki:colmodel_options中说:
align: Defines the alignment of the cell in the Body layer, not in header cell.
Possible values: left, center, right.
Run Code Online (Sandbox Code Playgroud)
请注意,它表示"不在标题单元格中".如何为标题单元格(网格标题单元格)执行此操作?文档没有提到这个小细节....
我如何才能使jqgrid的所有列都不可调整大小?目前我认为每个列都要指定属性{resizable:false}.无论如何,我可以指定整个网格吗?
我正在使用jqgrid,我想使用内联编辑并屏蔽条目,以便提示用户输入hh:mm,其中hh =小时和mm =分钟.我正在使用digitalBush蒙面jquery插件.问题是,当我从initData调用它时,它会覆盖该字段中的当前数据.我注意到当您使用模式表单进行编辑时,此行为会有所不同.有没有人有这个问题的解决方案?我将从任何事件中调用掩码,我很乐意使用任何可用的插件.据我所知,jqgrid格式化程序不提供自定义掩码,以我需要的格式引导用户输入.也很高兴错误(当然还有一小段代码来支持它).
非常感谢提前.
更新:我设法凑齐了我正在解决的问题的演示.所以显然删除了我想要包装它的html,以便它可以插入并按原样运行,所以你需要将它包装在一些html中才能看到它的工作原理.再次感谢您的帮助.这是代码:
<title>Mask Problem</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.2.0/css/ui.jqgrid.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.2.0/js/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.2.0/js/jquery.jqGrid.src.js"></script>
<script type="text/javascript">
$.jgrid.no_legacy_api = true;
$.jgrid.useJSON = true;
</script>
<script type="text/javascript">
$(function () {
var lastSel = -1;
var mydata = [
{ HoursWorked: "0:00" },
];
$.mask.definitions['5'] = '[0-5]';
$.mask.definitions['2'] = '[0-2]';
var $grid = $("#MyGrid");
$grid.jqGrid({
datatype: "local",
data: mydata,
height: 'auto',
width: 700, …Run Code Online (Sandbox Code Playgroud)