ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: queensgambit9 on October 24, 2016, 02:39:44 am
-
Im using splice to reorder the colModel and need to update the new colModel to the show / hide column feature...
Whats the best approach to do this?
Thanks.
-
It's already answered in this post:
http://paramquery.com/forum/index.php?topic=1780.0
-
Thanks, but when for example hide attribute is set on a column with:
colModel[0].hidden = true;
The checkboxes are still there (in columnselector) even though column is hidden...so it need to be updated...
grid.option( 'colModel', grid.option( 'colModel') );
grid.refresh();
doesn't seem to update that?
-
grid API doesn't affect the column selector( which is a select list in the toolbar)
It's the other way around in this example, http://paramquery.com/pro/demos/showhide_groups
when a option ( corresponding to column ) in select list is checked/ unchecked by the user, grid API is used from toolbar listener to hide / show the columns.
-
Thanks, but when I change the hidden attribute dynamically...can I update the checkbox in the columnSelector? (The other way around?)
-
Would this be possible?
Thanks.
-
It can be done by setting value of select list followed by refreshData() method of pqSelect as answered here.
http://paramquery.com/forum/index.php?topic=1853.0