PDA

View Full Version : grid.getGridColumns() gives me error



darkhorni
18 Jun 2012, 11:45 PM
I want to get an array of grid column header names. I have tried to use grid.getGridColumns (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.header.Container-method-getGridColumns) and this.getGridColumns (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.header.Container-method-getGridColumns)() under the grid. But it gives me an error that it is not a function. How it is used?

Romick
19 Jun 2012, 2:39 AM
Try this.getColumns()[colIndex] or
Ext.fly(this.getView().headerCt.getHeaderAtIndex(colIndex)).dom.el.down('span')

redraid
19 Jun 2012, 3:06 AM
grid.headerCt.getGridColumns();