SmartGWT 2.6.1
Google Chrome Browser.
Hello Everyone,
I have a requirement where "onRecordClick", the entire row need to be selected. Here is my code:
ListGrid grid = new ListGrid();
.
.
.
grid.setSelectionType(SelectionStyle.SIMPLE);
grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
grid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
if (grid.isSelected(event.getRecord())){
grid.setSelectionProperty(null);
grid.deselectRecord(event.getRecord());
}else{
grid.setSelectionProperty("isSelected");
grid.selectRecord(event.getRecord());
}
}
});
My problem is that, the checkbox no longer works after this code. i.e the record state is set to selected on click, but if i try to change the checkbox state directly , it does not work.
Can you please help?
Thank You,
Michaël.
Google Chrome Browser.
Hello Everyone,
I have a requirement where "onRecordClick", the entire row need to be selected. Here is my code:
ListGrid grid = new ListGrid();
.
.
.
grid.setSelectionType(SelectionStyle.SIMPLE);
grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
grid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(RecordClickEvent event) {
if (grid.isSelected(event.getRecord())){
grid.setSelectionProperty(null);
grid.deselectRecord(event.getRecord());
}else{
grid.setSelectionProperty("isSelected");
grid.selectRecord(event.getRecord());
}
}
});
My problem is that, the checkbox no longer works after this code. i.e the record state is set to selected on click, but if i try to change the checkbox state directly , it does not work.
Can you please help?
Thank You,
Michaël.
Comment