PDA

View Full Version : [OPEN] [CLOSED]Grid misses events fired



steffenk
21 Feb 2011, 12:01 AM
The grid is missing many events, as the subkect already say.

I found some events fired by grid.View (cellcllicks), for row only focus. So rowclick / rowdblclick are missing. i didn't found the column events for column move, columnclick etc.

It seems that this was structured different than in Ext3

Looking to console showing events and doc
http://dev.sencha.com/deploy/ext-4.0-pr1/docs/api/Ext.grid.View.html#events

it doesn't match.

aconran
21 Feb 2011, 11:43 AM
Because Ext.grid.View is just a subclass of DataView in Ext 4 it gets all of the events that a typical DataView would.

click, dblclick, etc replace rowclick and rowdblclick.

There are definitely some events that will be relayed up to the top GridPanel level that are currently not there.

Stroker
21 Feb 2011, 12:45 PM
I figured out there are an easy way to subscribe to all of the views events.


xtype: 'gridpanel',
viewConfig: {
listeners: {
click: function(dataview, index, item, e) {
}
}

James Goddard
23 Feb 2011, 8:55 AM
I found some events fired by grid.View (cellcllicks), for row only focus. So rowclick / rowdblclick are missing. i didn't found the column events for column move, columnclick etc.

Where did you find cellclick? I can only find row level events.

steffenk
23 Feb 2011, 2:33 PM
cellclicks are fired from the View
Go to http://dev.sencha.com/deploy/ext-4.0-pr1/examples/grid/array-grid.html
execute this in console:

cls = Ext.grid.View;
Ext.util.Observable.capture(cls.prototype, function() {
console.log(arguments);
}, cls);

James Goddard
24 Feb 2011, 6:11 AM
Silly me, I looked at the source....

Thanks for the tip.

Seboss
1 Mar 2011, 8:13 AM
'sortchange' event present in Ext JS 3 seems to be gone in Ext JS 4. How can I have the same functionality with Ext JS 4?

PV-Patrick
4 Mar 2011, 2:39 PM
I figured out there are an easy way to subscribe to all of the views events.


xtype: 'gridpanel',
viewConfig: {
listeners: {
click: function(dataview, index, item, e) {
}
}


I can't get this to work, I placed the viewConfig/listener on my grid config and can't get it to console output. Is there another way to grab a hold of a grids View? I know in 3.xyou could call getView(), what about with 4.x?

PV-Patrick
8 Mar 2011, 3:06 PM
I also noticed I don't see viewConfig listed in the properties for Ext.grid.GridPanel either...

aconran
11 Apr 2011, 8:19 PM
The view is now relaying its events like itemclick, itemdblclick, etc on the Grid directly.