ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: rkdmen on April 21, 2017, 03:21:05 am

Title: Hiding multiple column.
Post by: rkdmen on April 21, 2017, 03:21:05 am
Hi,

I'm trying to hide multiple column using one button. How can I achieve this?
I tried creating my own function by traversing td, td based on index and changing style.display to none.

Also, vice versa, style.display = 'table-cell'

It works, but once user starts interacting on grid (ex. typing on grid and enter), it refreshes whole thing, and style.display becomes 'none' to  'table-cell' automatically. How can I create so that, it retains the state even after user interaction.
Title: Re: Hiding multiple column.
Post by: paramvir on April 21, 2017, 10:44:00 pm
Direct manipulation of grid DOM doesn't last any user interaction.

columns can be hidden with hidden property of columns.

column.hidden = true;

followed by refreshCM()

https://paramquery.com/pro/demos/showhide_columns