javascript - How to show/Hide ALL column in grid? -
i have grid have header "show all" shows columns , "hide all" hides except default first column. here's code hide 1 of column header name, how go hiding @ same time?
var grid = ext.componentquery.query('grid[itemid=gridid]')[0]; var column = grid.getcolumnmanager(); column.getheaderbydataindex("columndataindexname").setvisible("true/false");
ext.array.each(grid.getcolumns(), function(column, index) { if (index > 0) { column.setvisible(false); } }, this);
Comments
Post a Comment