PDA

View Full Version : Header Click/Double click Event issue



himalpatel
11 Mar 2012, 10:46 PM
I need to handle double click event of grid header and I am doing it using following code, but couldn't get it working. it is not raising the event.


columns: [{
id: 'common',
header: 'Common Name',
xtype:'gridcolumn',
sortable: false,
listeners: {
headerclick: function (ct, column, e, t,x) {
alert('headerclick ');
}
}
,
dataIndex: 'common',
flex: 1
}]

What I am missing ?

Thanks
Himal

vietits
11 Mar 2012, 11:07 PM
1. There is no double click event from grid header, only 'headerclick' event.

2. Try to reconfigure columns as below:


columns: {
listeners: {
headerclick: function (ct, column, e, t,x) {
alert('headerclick ');
}
},
items: [{
id: 'common',
header: 'Common Name',
xtype:'gridcolumn',
sortable: false,
dataIndex: 'common',
flex: 1
}]
}

himalpatel
12 Mar 2012, 12:55 AM
cool!! it worked..
but does that mean that i cannot have double click event on the header ? that's bit surprising..

Please let me know.

Thanks
Himal

vietits
12 Mar 2012, 12:58 AM
Ext.grid.header.Container (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.header.Container) does not fire double click event.