Double click on the Gxt tree to display the popup
How can I catch the double click event in the gxt tree grid? I've already tried this: Click Tree Handlers in GXT 3?
tree.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
tree.getSelectionModel().addSelectionHandler(new SelectionHandler<MenuView.MenuDto>() {
public void onSelection(SelectionEvent<MenuDto> event) {
MenuDto mnu = event.getSelectedItem();
Info.display("Tree Handler", mnu.getDescripcion());
}
});
But it only works for one click, not double click.
I want the user to double click, a popup will appear.
+3
source to share
2 answers
In this case, the choice has a certain meaning - are you sure you want the doubleclick to trigger the selection, and only then do you want to be notified?
Instead, look grid.addRowDoubleClickHandler
- your handler will be assigned the index of the row that was clicked, and then you can ask the store what item is on that row.
Relevant GXT Javadoc:
0
source to share