JQGrid-冻结列-冻结到网格右端的列 [英] JQGrid - frozen column - freezing column to right end of the grid

查看:494
本文介绍了JQGrid-冻结列-冻结到网格右端的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将最后一列冻结在网格的右侧?

Is it possible to freeze last column to the right side of the grid?

我遇到的所有演示都冻结了1st或1st&网格左侧第二列.

All the demos that I came across shows freezing 1st or 1st & 2nd column to left side of the grid.

我尝试使用frozen:true属性仅对colModel中的最后一列进行操作,但无法正常工作.

I tried using frozen:true property to only last column in colModel, but its not working.

推荐答案

jqGrid中冻结列的当前实现不允许将最后一列冻结到网格的右侧.因此,我看不到在jqGrid中实现您的需求的任何简单方法.

The current implementation of frozen columns in jqGrid don't allows to freeze last columns to the right side of the grid. So I don't see any simple way to implement your requirements in jqGrid.

之所以复杂,是因为在jqGrid中实现了冻结列.方法setFrozenColumns从开头(从colModel数组的第一个索引开始)从左侧检查colModel (请参阅

The reason of the complexity is in the implementation of frozen columns in jqGrid. The method setFrozenColumns examine colModel from the left (from the first index of the colModel array) at the beginning (see the part of the source code). It finds the max index of colModel which have frozen: true property and then makes the copy of the columns of the grid in the separate div. In other words jqGrid take in considerations only first columns of colModel which have frozen: true property. All other properties which have frozen: true will be ignored. Then jqGrid creates always the div with left frozen columns only. So the usage of frozen columns on the right side of the grid not provided.

这篇关于JQGrid-冻结列-冻结到网格右端的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆