使用本地数据将冻结设置为 jqGrid 的前两列。其中 colModel 和 colNames 是动态绑定的
Set frozen to first two column of jqGrid using local data. where colModel and colNames are dynamically bound
通过在 colModel 中设置列 frozen : true
和
打电话
jquery(your_jqgridName).jqGrid('setFrozenColumns');
在这种情况下它不起作用。
看来你必须在 jquery 中输入大写字母 Q
:
jQuery(your_jqgridName).jqGrid('setFrozenColumns');
//^----here
Limitations
The following limitations tell you when frozen columns can not be
set-up
- When TreeGrid is enabled
- When SubGrid is enabled
- When cellEdit is enabled
- When inline edit is used - the frozen columns can not be edit.
- When sortable columns are enabled - grid parameter sortable is set to true or is function
- When scroll is set to true or 1
- When Data grouping is enabled
- When footer row (footerrow paremeter) is enabled
来自 Here
中的答案
将其添加到设置的冻结列下方。
$grid[0].p._complete.call($grid[0]);
其中 $grid 定义为 var $grid = $('#list');.
通过在 colModel 中设置列 frozen : true
和
打电话
jquery(your_jqgridName).jqGrid('setFrozenColumns');
在这种情况下它不起作用。
看来你必须在 jquery 中输入大写字母 Q
:
jQuery(your_jqgridName).jqGrid('setFrozenColumns');
//^----here
Limitations
The following limitations tell you when frozen columns can not be set-up
- When TreeGrid is enabled
- When SubGrid is enabled
- When cellEdit is enabled
- When inline edit is used - the frozen columns can not be edit.
- When sortable columns are enabled - grid parameter sortable is set to true or is function
- When scroll is set to true or 1
- When Data grouping is enabled
- When footer row (footerrow paremeter) is enabled
来自 Here
中的答案将其添加到设置的冻结列下方。
$grid[0].p._complete.call($grid[0]);
其中 $grid 定义为 var $grid = $('#list');.