That was what I was after..
Code:
listGrid.addSelectionChangedHandler(new SelectionChangedHandler() {
@Override
public void onSelectionChanged(SelectionEvent selectionEvent) {
if (selectionEvent.getSelection() != null) {
ListGridRecord record = selectionEvent.getRecord();
boolean selected = listGrid.isSelected(record);
int rowIndex = listGrid.getRecordList().indexOf(record);
for (String attributeName : record.getAttributes()) {
if (attributeName.startsWith(CaseTypeRoleDS.PERMISSION_PREFIX)) {
int colNum = listGrid.getFieldNum(attributeName);
listGrid.setEditValue(rowIndex, colNum, selected);
}
}
}
}
});
Dale
Leave a comment: