Hi,
I have a DataGrid, and when I remove a selected row, I want the grid to
entirely clear any selections. Then if I hit "delete selected" again,
nothing should happen as nothing is selected. But it DOES delete another
entry. Why?
Button button = new Button("delete selected);
@UiHandler
void onDelete(ClickEvent evt) {
Object o = singleSelectionModel.getSelectedObject().
dataProvider.remove(o);
dataProvider.flush();
singleSelectionModel.clear();
}
Result: after I delete an object, the selection is set to the first entry
in the grid. Thus the first object will always be deleted if I click the
button again...
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.