my ListGrid already set .setSelectionType(SelectionStyle.SIMPLE) and .setSelectionAppearance(SelectionAppearance.CHECKBOX),but now I want to set the checkbox of the first record true when loaded some records.So,how can I code it ?

有帮助吗?

解决方案

Try the following:

listGrid.addDataArrivedHandler(new DataArrivedHandler() {
    @Override
    void onDataArrived(DataArrivedEvent event) {
        listGrid.selectRecord(0);
    }
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top