I am currently picking up on a row selection (single click) in a DataGrid using NoSelectionModel (As seen below). This works fine and I perform a certain action based on this selection. However, I also want to pick up on when a user double clicks a row in this data grid. Does anyone have any advice? Thanks!
final NoSelectionModel<MyObjectRecord> selectionModel = new NoSelectionModel<MyObjectRecord>();
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
final MyObjectRecord myObjectRecord = selectionModel.getLastSelectedObject();
// Do stuff with myObjectRecord
}
});
this.setSelectionModel(selectionModel);
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/mKxVnb-JzJ0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment