Author Topic: Hiding multiple column.  (Read 2164 times)

rkdmen

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hiding multiple column.
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Hiding multiple column.
« Reply #1 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