是否可以默认隐藏jQuery Grid中的列?

时间:2022-09-15 12:32:52

I have been working with the jQuery Grid the past few days and one thing I have not found any documentation on yet is the ability to hide a column by default.

我过去几天一直在使用jQuery Grid,而且我还没有找到任何文档的一件事是默认情况下隐藏列的能力。

The reason I want this is that I'm building my JSON w/ every property of my object yet my grid might only show 75% of these as valid columns. I want the ability to pass back more JSON than I actually use, and one way I thought to accomplish this would be to hide the columns I'm not using.

我想要这个的原因是我正在构建我的JSON w /我的对象的每个属性,但我的网格可能只显示其中75%作为有效列。我希望能够传回比我实际使用的更多JSON,并且我认为实现这一目的的一种方法是隐藏我不使用的列。

Any other suggestions are welcome, but I would prefer the ability to push down a larger list of JSON than I actually use by default.

欢迎提出任何其他建议,但我更倾向于能够按下比默认情况下实际使用的更大的JSON列表。

2 个解决方案

#1


In the colModel initializer array, you can specify

在colModel初始化程序数组中,您可以指定

hidden: true

on any of the columns.

在任何一列上。

#2


What version of flexgrid are you using...? my one doesn't accept hidden property in colModel

您使用的是什么版本的flexgrid ......?我的人不接受colModel中的隐藏属性

it does accept

它接受了

hide: true

#1


In the colModel initializer array, you can specify

在colModel初始化程序数组中,您可以指定

hidden: true

on any of the columns.

在任何一列上。

#2


What version of flexgrid are you using...? my one doesn't accept hidden property in colModel

您使用的是什么版本的flexgrid ......?我的人不接受colModel中的隐藏属性

it does accept

它接受了

hide: true