I have a scenario where i am working with a GWT DataGrid on which when the
user makes a double-click an event should be raised containing the
information about the model bean of the selected selected row.
e.g : For a DataGrid containing informations about persons (columns: first
name , last
My (dirty) workaround was extending AbstractCell class and adding the
custom code within:
@Override
public void onBrowserEvent(final Context context, final Element parent,
final C value,
final NativeEvent event, final ValueUpdaterC
valueUpdater) {
HasDataT
If you want to do this outside the Datagrid you can use
DataGrid.addCellPreviewHandler(). The event contains all the information
you need.
And it is SelectionModel? super T because its less restrictive. For
example you can have a DataGridInteger that holds a more generic
SelectionModelNumber.
Thanks Jens for the tip.
For anybody interested on the solution I've implemented it in the following
manner :
addCellPreviewHandler(new CellPreviewEvent.HandlerT() {
@Override
public void onCellPreview(final CellPreviewEventT event) {
//