views:

298

answers:

2

I am using Ext.grid.gridpanel.As in rowclick event, we can handle row click of grid..Is there any event to handle column click of grid?

i want to select a particular column of grid.

A: 

You can use the CellSelectionModel for that.

Lloyd
+1  A: 

There is no special columnclick event on the gridpanel or the selection model, but you can listen to the

cellclick : ( Grid this, Number rowIndex, Number columnIndex, Ext.EventObject e )

event on the gridpanel itself - irrespective which selection model you use. Looking at the columnIndex you'll know which column has been clicked. If you want to react on clicks onto the header row, use the headerclick event instead.

Stefan Gehrig