ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: queensgambit9 on October 24, 2016, 02:39:44 am

Title: colModel reorder
Post 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.
Title: Re: colModel reorder
Post by: paramvir on October 24, 2016, 07:25:45 am
It's already answered in this post:

http://paramquery.com/forum/index.php?topic=1780.0
Title: Re: colModel reorder
Post by: queensgambit9 on November 15, 2016, 07:31:13 pm
Thanks, but when for example hide attribute is set on a column with:

Code: [Select]
colModel[0].hidden = true;
The checkboxes are still there (in columnselector) even though column is hidden...so it need to be updated...

Code: [Select]
grid.option( 'colModel', grid.option( 'colModel') );
grid.refresh();

doesn't seem to update that?

Title: Re: colModel reorder
Post by: paramvir on November 15, 2016, 08:49:27 pm
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.
Title: Re: colModel reorder
Post by: queensgambit9 on November 25, 2016, 07:29:16 pm
Thanks, but when I change the hidden attribute dynamically...can I update the checkbox in the columnSelector? (The other way around?)

Title: Re: colModel reorder
Post by: queensgambit9 on December 04, 2016, 05:54:54 pm
Would this be possible?
Thanks.
Title: Re: colModel reorder
Post by: paramvir on December 05, 2016, 06:09:26 pm
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