PDA

View Full Version : Columns Array from GridPanel



ajay.kumar2
15 Nov 2010, 9:57 AM
Which object has getColumnData() API ? I am using ExtJS 3.2

Actually i need to access the array of columns which my grid has, I have tried using


var colArr=mygrid.getColumnModel().config but when i do


colArr[0].name i get undefined. It should give me the name of the first column.

Please provide help on this.

Screamy
15 Nov 2010, 10:08 AM
It would probably be better to use the ColumnModel object itself to get at the metadata of each column:


mygrid.getColumnModel.getColumnHeader(columnNumber);
mygrid.getColumnModel.getColumnById(stringId);
mygrid.getColumnModel.getDataIndex(columnNumber);
etc.