Refreshes toolbar button that allows to show/hide columns.
initColumnOnOff()
Returns undefined.

#### Description

Every time you add or remove columns to the grid, the drop down menu on the toolbar that allows to show/hide columns should be rebuilt. This menu is built when grid is rendered, but not rebuilt when grid is refreshed. If you use .addColumn() or .removeColumn() it will rebuild toolbar show/hide column button. However, if you do change .columns array directly, you will need to call .initColumnOnOff() method in addition to .refresh() method.
If you have grid defined in the following way: $('#grid').w2grid({ name : 'grid', columns: [ { field: 'recid', caption: 'ID', size: '50px' }, { field: 'lname', caption: 'Last Name', size: '30%' }, { field: 'fname', caption: 'First Name', size: '30%' }, { field: 'email', caption: 'Email', size: '40%' }, { field: 'sdate', caption: 'Start Date', size: '120px' }, { field: 'sdate', caption: 'End Date', size: '120px' } ] }); And if you change columns directly, you will need to: w2ui['grid'].columns.splice(0, 1); w2ui['grid'].initColumnOnOff(); w2ui['grid'].refresh();