hideColumnReturns: grid

Hide column from the grid.

Parameters

NameTypeDescription
field {string} The name of the field bound to the column.

Examples

sample

    
 <button id="btnHideColumn" class="gj-button-md">Hide Column</button>
 <br/><br/>
 <table id="grid"></table>
 <script>
     var grid = $('#grid').grid({
         dataSource: '/Players/Get',
         columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
     });
     $('#btnHideColumn').on('click', function () {
         grid.hideColumn('PlaceOfBirth');
     });
 </script>