mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

SlickGrid Column picker - Event for show or hide column after clicking checkbox #1137

Open urprasu opened 7 years ago

urprasu commented 7 years ago

SlickGrid Column picker - Event for show or hide column after clicking checkbox

6pac commented 7 years ago

http://stackoverflow.com/questions/19725250/is-it-possible-to-show-and-hide-some-slickgrid-columns-on-button-click

urprasu commented 7 years ago

I have below columns default var columns = [{ id: 'name' , field: 'name' , name: 'Device Name' , width: 100 }, { id: 'lastComm' , field: 'lastCommunication' , name: 'Last Communication' , width: 130 , headerCssClass: 'last-communication' , formatter : this.lastCommunicationFormatter },{ id: 'esn' , field: 'esn' , name: 'ESN' , width: 80 }]

Using Header Column picker user check or uncheck the 'Last Communication' column i have to call one function how to do it?

6pac commented 7 years ago

use grid.setColumns() like the StackOverflow article says