Tutorial :Is it possible to hide columns in jQuery Grid by default?



Question:

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.

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.

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.


Solution:1

In the colModel initializer array, you can specify

hidden: true  

on any of the columns.


Solution:2

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

it does accept

hide: true  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »