PDA

View Full Version : grid get column header



elona
22 Feb 2010, 4:58 PM
hi,
i have an editor gridpanel to show a calendar for presences. when updating the grid i want to get the column header, but cannot find the right way to do it.
any ideas
thnx

fay
23 Feb 2010, 2:35 AM
See: http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel


grid.getColumnModel().getColumnHeader(columnIndex);

elona
23 Feb 2010, 5:19 AM
See: http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel


grid.getColumnModel().getColumnHeader(columnIndex);
ok but how do i get the columnIndex?

Animal
23 Feb 2010, 5:24 AM
Read the docs properly.

http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel?member=findColumnIndex

elona
23 Feb 2010, 7:09 AM
Read the docs properly.

http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel?member=findColumnIndex

i see no function that returns the column index when a cell is being edited or after edit. If you can indicate some example i would be very happy B)?

fay
23 Feb 2010, 7:14 AM
Read the docs (http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.EditorGridPanel) properly. The afteredit event passes the column index...


afteredit : ( Object e )

Fires after a cell is edited. The edit event object has the following properties

grid - This grid
record - The record being edited
field - The field name being edited
value - The value being set
originalValue - The original value for the field, before the edit.
row - The grid row index
column - The grid column index

Animal
23 Feb 2010, 7:28 AM
i see no function that returns the column index when a cell is being edited or after edit. If you can indicate some example i would be very happy B)?

Thanks for the context to "how do i get the columnIndex?" finally.

fay has answered.

elona
23 Feb 2010, 7:33 AM
finally i did it...it was so clear but i was having my mind messed up...
thanks a lot :D