Question

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 ?

Was it helpful?

Solution

Try the following:

listGrid.addDataArrivedHandler(new DataArrivedHandler() {
    @Override
    void onDataArrived(DataArrivedEvent event) {
        listGrid.selectRecord(0);
    }
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top