Reputation: 819
Is that possible to listen click event on a row of a ListGrid ? If yes, how can I proceed ?
Upvotes: 1
Views: 1702
Reputation: 8158
@Manu Alternatively you can do the following:
listGrid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
// your code
}
});
Upvotes: 4
Reputation: 819
ListGridField[] listGridFields = listGrid.getFields();
for (ListGridField listGridField : listGridFields) {
listGridField.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
evaluator.recordClicked(event.getRecord());
}
});
}
Is there a better way to do that ?
Upvotes: 0