-
24 Dec 2011 1:15 PM #1
4.1 beta - Locking grid do not respond to cellclick event
4.1 beta - Locking grid do not respond to cellclick event
Since my earlier bug report was CLOSED, so am starting a new thread, with little more info on it
cellclick event in locking grid do not respond.
I think it is a similar issue as
EXTJSIV-3775 : 'itemclick' event doesn't bubble when using locking grid
cellclick event is not documented, this raises a doubt if it will be supported in future versions?
Test case
Code:Ext.onReady(function() { Ext.QuickTips.init(); // sample static data for the store var myData = [ ['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'], ['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'], ['Altria Group Inc', 83.81, 0.28, 0.34, '9/1 12:00am'], ['American Express Company', 52.55, 0.01, 0.02, '9/1 12:00am'], ['American Group, Inc.', 64.13, 0.31, 0.49, '9/1 12:00am'], ]; var store = Ext.create('Ext.data.ArrayStore', { fields: [ {name: 'company'}, {name: 'price', type: 'float'}, {name: 'change', type: 'float'}, {name: 'pctChange', type: 'float'}, {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'} ], data: myData }); // create the Grid var grid = Ext.create('Ext.grid.Panel', { store : store, selType :'cellmodel', columns: [{text:'Company', width:200, dataIndex:'company',locked : true }, {text:'Price' , width:125, dataIndex:'price' }, {text:'Change' , width:125, dataIndex:'change' }, {text:'%Change', width:125, dataIndex:'pctChange'}, {text:'Updated', width:35, dataIndex:'lastChange'}], height: 350, width : 600, title : 'Locking Grid Column', renderTo:'grid-example', }); }); grid.on( 'cellclick', function(){ console.log(arguments); }, this )
-
25 Dec 2011 6:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
Even though cellclick is not documented, itemclick doesn't do everything it should... it doesn't give you the column index.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Dec 2011 10:48 AM #3
Thanks for assigning it a ticket
Thanks for assigning it a ticket
That being said, i will continue to use and depend on cellclick event (for now without a locking grid)
-
22 Jun 2012 12:09 AM #4
seems like this issue is still there in 4.1.1 RC2
seems like this issue is still there in 4.1.1 RC2
can you confirm if this will be solved in this release ?
-
21 Dec 2012 8:15 AM #5
EXTJSIV-4875 - Status Check
EXTJSIV-4875 - Status Check
Will this be resolved in 4.2 ? It does not seem to be resolved in 4.1.3 or 4.2 beta
-
7 Jan 2013 12:58 PM #6
An update on the status of this bug would be greatly appreciated. We need to use a locking column in our application and we need the cellclick event as well.
Thanks!
-
16 Jan 2013 11:09 AM #7
jhoweaa,
I did come across the following override. I am not sure if it will fix it. But you can try it out and check if there you have no other alternatives.
Ext.define( 'EXTJSIV-4875.grid.Panel', {
extend: 'Ext.grid.Panel',
bothCfgCopy: [ 'invalidateScrollerOnRefresh',
'hideHeaders',
'enableColumnHide',
'enableColumnMove',
'enableColumnResize',
'sortableColumns',
'listeners' // added this so that ExtJs is registering the listeners if injected by config
],
normalCfgCopy: [ 'verticalScroller',
'verticalScrollDock',
'verticalScrollerType',
'scroll'
],
lockedCfgCopy: [ ],
/// overridden to delegate events to locked/normal grid depending on the config above
on: function( eventName, fn, scope, options ){
// if lockedColumn feature is used, delegate listeners to normalGrid/lockedGrid
if( this.lockable ){
if( this.normalGrid && this._issetInCfgCopy( 'listeners', this.normalCfgCopy ) ){
this.normalGrid.on( eventName, fn, scope, options );
}
if( this.lockedGrid && this._issetInCfgCopy( 'listeners', this.lockedCfgCopy ) ){
this.lockedGrid.on( eventName, fn, scope, options );
}
return;
}
this.callParent( arguments );
},
/**
* Returns true, if a config section is copied to special grid (locked or normal).
*
* @param {string} configSection The name of the config section.
* @param {Array} specialConfig The special config: this.normalCfgCopy or this.lockedCfgCopy
* @return {Boolean}
*/
_issetInCfgCopy: function( configSection, specialConfig ){
var config = Ext.Array.merge( this.bothCfgCopy, specialConfig );
var i, ln;
for( i = 0, ln = config.length; i < ln; i++ ){
if( config[i] === configSection ){
return true;
}
}
return false;
}
});
-
1 Mar 2013 8:35 AM #8
Is this fixed ??
Is this fixed ??
Looks like it is fixed http://cdn.sencha.com/ext/beta/4.2.0...ting-grid.html and http://www.sencha.com/forum/showthre...t-events/page2
-
9 Mar 2013 7:07 PM #9
Yes, this is fixed.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-4875
in
4.2.


Reply With Quote