在中IE10
,un-frozen column headers
当数据为时,正在滚动scrolled horizontally
。IE 10,没有问题,按预期可以正常工作。
但是,在进行中时,inIE11
和in都不会与数据一起出现。chrome latest version
Un-Frozen columns headers
moving(scrolling)
horizontal scroll
jqgrid
我将前两列设置为frozen to true
。
代码:
$grid.jqGrid({
datatype: 'local',
data: myData,
colNames: ['Column1', 'Column2', 'Column3', 'Column4', 'Column5', 'Column6',
'Column7', 'Column8', 'Column9', 'Column10', 'Column11', 'Column12'],
colModel: [
{ name: 'col1', index: 'col1', frozen: true }, { name: 'col2', index: 'col2', frozen: true },
{ name: 'col3', index: 'col3' }, { name: 'col4', index: 'col4' },
{ name: 'col5', index: 'col5' }, { name: 'col6', index: 'col6' }, { name: 'col7', index: 'col7' },
{ name: 'col8', index: 'col8' }, { name: 'col9', index: 'col9' }, { name: 'col10', index: 'col10' },
{ name: 'col11', index: 'col11' }, { name: 'col12', index: 'col12' }
],
shrinkToFit: false,
rowNum: 20,
rowList: [5, 10, 20, 50, 100],
pager: '#pager',
gridview: true,
ignoreCase: true,
rownumbers: true,
sortname: 'col3',
viewrecords: true,
sortorder: 'desc',
caption: "TEST",
height:'auto'
});
$grid.jqGrid('setFrozenColumns');
的CSS
.ui-jqgrid .ui-jqgrid-bdiv {
position: relative;
margin: 0em;
padding: 0;
overflow: auto;
text-align: left;
height:650px !important;
}
Un-Frozen columns headers
没有moving(scrolling)
数据,在做的时候一起horizontal scroll
在jqgrid
特别是在IE11
和Chrome
。为我提供解决方案。谢谢。
尝试添加
$grid.triggerHandler("jqGridAfterGridComplete");
之后$grid.jqGrid("setFrozenColumns");
。如果在调用之前填充jqGrid主体,则应执行此操作setFrozenColumns
。在我看来,这是jqGrid的问题(请参阅线程中的最后一篇文章),该问题应该得到解决,但是Tony(jqGrid的开发人员)对此问题有另一种看法。
顺便说一句,我认为您不需要使用CSS。而是应width
在网格中指定选项,以便网格将具有水平滚动条。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句