1

是否可以在 ListGrid 的一行上监听 click 事件?如果是,我该如何进行?

4

2 回答 2

4

@Manu 或者,您可以执行以下操作:

listGrid.addRecordClickHandler(new RecordClickHandler() {
        @Override
        public void onRecordClick(RecordClickEvent event) {
            // your code
        }
});
于 2012-10-09T06:12:56.777 回答
0
ListGridField[] listGridFields = listGrid.getFields();
for (ListGridField listGridField : listGridFields) {

  listGridField.addRecordClickHandler(new RecordClickHandler() {

    @Override
    public void onRecordClick(RecordClickEvent event) {
      evaluator.recordClicked(event.getRecord());
    }
  });

}

有更好的方法吗?

于 2012-10-08T16:32:44.540 回答