Is it possible to show and hide some Slickgrid columns when a button is clicked

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

For example, I have a slickgrid having 3 columns. When I click the button, I want to show three more columns, i.e. 4,5,6. When the button is pressed again, these columns should be hidden, and the other div should take its place. Thus, basically we switch 3 out of 6 columns with a hexadecimal list. thanks

+4
source share
1 answer

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

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

+9
source

All Articles