如何滚动jqgrid表的水平条但仍保留第一列? [英] How to scroll horizontal bar of jqgrid table but still keep first column ?
本文介绍了如何滚动jqgrid表的水平条但仍保留第一列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨专家!
我用jqgrid插件来创建表格。当我向左或向右滚动水平条时我想保留第一列的所有内容。我搜索谷歌但仍然没有找到方法。有经验的专家请帮帮我!
非常感谢你!
代码:
< table id =grid-viewresult>< table>
$( #grid-viewresult)。jqGrid({
data:data,
数据类型: local,
height: 220 ,
宽度: 462 ,
colNames:colNames,
colModel:colModel,
rowNum: 99999999 ,
toolbarfilter: false ,
viewrecords : false ,
multiselect: false ,
autowidth: false ,
forceFit: true ,
shrinkTo适合: false
});
解决方案
(< span class =code-string> #grid-viewresult)。jqGrid({
data:data,
数据类型: local,
height: 220 ,
宽度: 462 ,
colNames:colNames,
colModel:colModel,
rowNum: 99999999 ,
toolbarfilter: false ,
viewrecords: false ,
multiselect: false ,
autowidth: false ,
forceFit: true ,
shrinkToFit: false
});
来自jqGrid Wiki:
http://www.trirand .com / jqgridwiki / doku.php?id = wiki:frozencolumns [ ^ ]
Twomethods,通过在列模型中声明或动态使用setFrozenColumns方法。
Hi experts!
I used jqgrid plugin to create table. while i scroll horizontal bar to left or right i want to keep all contents of first column. I searched google but still haven't found ways yet. Expert who have experienced please help me!
thank you so much!
code:
<table id="grid-viewresult"><table>
$("#grid-viewresult").jqGrid({
data: data,
datatype: "local",
height: 220,
width: 462,
colNames: colNames,
colModel: colModel,
rowNum: 99999999,
toolbarfilter: false,
viewrecords: false,
multiselect: false,
autowidth: false,
forceFit: true,
shrinkToFit: false
});
解决方案
("#grid-viewresult").jqGrid({ data: data, datatype: "local", height: 220, width: 462, colNames: colNames, colModel: colModel, rowNum: 99999999, toolbarfilter: false, viewrecords: false, multiselect: false, autowidth: false, forceFit: true, shrinkToFit: false });
From the jqGrid Wiki:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:frozencolumns[^]
Twomethods, either by declaring in the column model or dynamically using the setFrozenColumns method.
这篇关于如何滚动jqgrid表的水平条但仍保留第一列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文