Is it Possible to show and hide some Slickgrid Columns on button click
Asked Answered
I

1

6

I need to show/hide some of the slickgrid columns on the click of a button. Is it possible?

For example , I have a slickgrid having 3 columns. On click of a button I want to show three more columns i.e 4,5,6. On clicking the button again these columns should hide and another div should take its place. So basically toggle 3 of the 6 slickgrid columns. Thanks

Idolism answered 1/11, 2013 at 10:47 Comment(1)
See also: #6373836Adulterous
P
11

SlickGrid doesn't have a concept of showing or hiding columns. It shows whatever columns you specify in the constructor or in a later call to grid.setColumns(). If you want to hide a column, just remove it from the columns array you call grid.setColumns() again.

You can keep the original columns array with all the columns in a separate variable.

Pelham answered 4/11, 2013 at 20:3 Comment(1)
thanks a lot!..i guess using that along with dynamically changing the grid width helped!!Idolism

© 2022 - 2024 — McMap. All rights reserved.