Here is my Flexigrid:
$("#grUser").flexigrid({
url: 'someJSON.php'
, dataType: 'json'
, colModel :
[
{display: '', name : 'Index', width :100, align: 'left'}
, {display: '', name : 'Value', width : 100, align: 'left'}
]
, title: 'Details'
, width: 350
, height: 200
, singleSelect: true
});
The show/hide columns feature in the header is really cool option, but I want to specify on which column to be available, and I am having trouble finding a good documentation about what are my options in specifying the colModel. Here
{display: '', name : 'Index', width :100, align: 'left'}
What else can we put in the definition of a column?
Additionally - what is your documentation source for Flexigrid?
Unfortunately, documentation for this isn't there and is thus very frustrating. You have to look at the source code and see what you can do.
Just add 'hide: true' as shown below. Setting hide to true, will hide a column.
{display: 'Row ID', name : 'id', width : 100, sortable : true, align: 'left', hide: true}
You can set the following attributes:
- display
(this is what is used for column headings)
name
(this is the database field name used for Ajax calls)
width
height
sortable
: true/false
align
: left/center/right
hide
: true/false
searchable
: true/false (only applicable if you have the search bar turned on)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With