9 Oct 2012 10:58 AM #1
Extjs 4 roadmoap question: cellcontextmenu / headercontextmenu
It looks like in 4.1.1a that there is not a cellcontextmenu or headercontextmenu event. Does anyone know if those events are on the 4.x roadmap?
Or perhaps if those events are, indeed, exposed in 4.1.1a and maybe I just overlooked them?
9 Oct 2012 4:06 PM #2
9 Oct 2012 4:17 PM #3
Cell click and cell double-click
cellclick / celldblclick
made it to Ext 4 from 3.x, but cellcontextmenu never did.
I'm needing a different menu depending on whether I right-clicked on column 1 -vs- column 2. In 3.x cellcontextmenu gave you as one of the params in the listener the call/column index.
Can't remember if there was a headercontextmenu option in 3.x, but there is headerclick in 4.x - hoping for headercontextmenu as well.
17 Oct 2012 1:53 PM #4
I'm hunting for a cellcentextmenu event in 4.1.1 or beyond. Any word on how to do this and if it's on the roadmap?
In 3.4 I was able to use:
4.1.x doesn't seem to have an equivalent event.
23 Oct 2012 1:55 PM #5
I'm seeing some notes from Animal on some changes coming through in 4.2. Any chance anyone can comment on the cellcontextmenu and headercontextmenu events for 4.2's roadmap?
6 Nov 2012 1:40 PM #6
This worked for me, in the grid's itemcontextmenu listener:
var view = grid.getView();
var cellNode = e.getTarget(view.cellSelector);
var header = view.getHeaderByCell(cellNode);
var column = _.indexOf(view.headerCt.getGridColumns(), header);
6 Nov 2012 1:54 PM #7
Thanks for the workaround. I might have eventually gotten the cell and cell header, but something tells me I'd never have gotten the column index.
Anyone on the dev team know if this functionality will make it into the API in 4.2? I'm hoping since cellcontextclick was in 3.x and 4.x has cellclick and celldblclick that we'll get that last one, too, along with headercontextclick.
7 Nov 2012 2:58 PM #8
- Join Date
- Nov 2007
- Stockholm, Sweden
- Vote Rating
+1 for getting this in. Should be extremely easy to solve. And I'd propose aliasing the 'itemXXX' events to 'rowXXX', in tables we're dealing with rows and cells, not 'items'. This is how it was in Ext 3 too.
7 Nov 2012 3:10 PM #9
At one point I put in a feature request and I believe Mitchell green lit it / sent a story. But, that was quite a number of minor releases back.
7 Nov 2012 3:23 PM #10
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
cellcontextmenu already exists in 4.1.1, it's just not documented. It also needs to be relayed up to the panel.Table, but it's there.
Adding header context menu is easy enough.Evan Trimboli
Twitter - @evantrimboli
Don't be afraid of the source code!