是否可以在ListGrid的一行上侦听点击事件?如果是,我该怎么办?
答案 0 :(得分:4)
@Manu或者您可以执行以下操作:
listGrid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
// your code
}
});
答案 1 :(得分:0)
ListGridField[] listGridFields = listGrid.getFields();
for (ListGridField listGridField : listGridFields) {
listGridField.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
evaluator.recordClicked(event.getRecord());
}
});
}
有更好的方法吗?