Hi
We are using SGWT 3.0 Lgpl.
The below code does not work in FF 21.0
Trying to add a checkBox to select all records With Title in listGridField. as i can't find any direct way to do this.
ListGridField lgfPendingCol = new ListGridField(COL_PEND, "XXX");// my title
lgfPendingCol.setAlign(Alignment.CENTER);
lgfPendingCol.setType(ListGridFieldType.BOOLEAN);
lgfPendingCol.setCanEdit(true);
// Add Select all check box with title
final Button buttonProperties = new Button();
buttonProperties.setIconSize(13);
buttonProperties.setIcon("[SKIN]/DynamicForm/uncheck_Down.png");
buttonProperties.addIconClickHandler(new IconClickHandler() {
private boolean isCheckAll = false;
@Override
public void onIconClick(IconClickEvent event) {
if(isCheckAll){
isCheckAll = false;
buttonProperties.setIcon("[SKIN]/DynamicForm/uncheck_Down.png");
}else{
isCheckAll = true;
buttonProperties.setIcon("[SKIN]/DynamicForm/checked.png");
}
for(ListGridRecord record:lgMsg.getRecords()){
record.setAttribute(COL_PEND, isCheckAll);
lgMsg.updateData(record);
}
lgMsg.markForRedraw();
}
});
lgfPendingCol.setHeaderButtonProperties(buttonProperties );
Please give some solution.
Thanks
Minhaj
We are using SGWT 3.0 Lgpl.
The below code does not work in FF 21.0
Trying to add a checkBox to select all records With Title in listGridField. as i can't find any direct way to do this.
ListGridField lgfPendingCol = new ListGridField(COL_PEND, "XXX");// my title
lgfPendingCol.setAlign(Alignment.CENTER);
lgfPendingCol.setType(ListGridFieldType.BOOLEAN);
lgfPendingCol.setCanEdit(true);
// Add Select all check box with title
final Button buttonProperties = new Button();
buttonProperties.setIconSize(13);
buttonProperties.setIcon("[SKIN]/DynamicForm/uncheck_Down.png");
buttonProperties.addIconClickHandler(new IconClickHandler() {
private boolean isCheckAll = false;
@Override
public void onIconClick(IconClickEvent event) {
if(isCheckAll){
isCheckAll = false;
buttonProperties.setIcon("[SKIN]/DynamicForm/uncheck_Down.png");
}else{
isCheckAll = true;
buttonProperties.setIcon("[SKIN]/DynamicForm/checked.png");
}
for(ListGridRecord record:lgMsg.getRecords()){
record.setAttribute(COL_PEND, isCheckAll);
lgMsg.updateData(record);
}
lgMsg.markForRedraw();
}
});
lgfPendingCol.setHeaderButtonProperties(buttonProperties );
Please give some solution.
Thanks
Minhaj
Comment