GXT 3.0 - expand and collapse events for TreeGrid
I can't find any way to intercept expand and collapse events for the TreeGrid... am I missing something or is this just not supported?
Have you tried tree.addBeforeExpandHandler(...)?
Thanks for the reply, unfortunately I need to use a TreeGrid not a Tree.
Actually, I would happily use a Tree but I also need it to be editable and can't find any way to make an editable Tree.
Seems like a bit of a catch 22, need an editable Tree use a TreeGrid, need to handle expand and collapse use a Tree. Need both...
I think you will be able to use a tree for editable items.
Just write your own cell, based Cell<C>, override onBrowserEvent and onRender with the behavior you want and use setCell(yourCell) to set the Cell inside the tree.
I would give this a try.
Is there a reason, expand and collapse events are not supported in a TreeGrid? I also miss that feature.
Sencha - GXT Dev Team
TreeGrid now implements HasBeforeCollapseItemHandlers, HasCollapseItemHandlers, HasBeforeExpandItemHandlers, and HasExpandItemHandlers. Changes are in RC2:
Wow, that was fast - thanks!