SmartClient Version: v11.0p_2016-08-22/LGPL Development Only (built 2016-08-22)
All browsers
I have a listgrid with a checkbox item as a custom cell editor. The cell's values are 1 or 0. So before I return the checkbox item i check what value the cell has and afterwards i want to set the value of the checkbox item accordingly. The thing is that the checkbox item does not change it's value and it is always checked as a default no matter what value i set it to. below is the code i tried to making it work.
brightSchedGrid.setEditorCustomizer(new ListGridEditorCustomizer() {
@Override
public FormItem getEditor(ListGridEditorContext context) {
switch (context.getRowNum()) {
case 2:
CheckboxItem cbi = new CheckboxItem();
cbi.setShowLabel(false);
GWT.log(brightSchedGrid.getRecord(2).getAttribute("value").toString());
cbi.setValue(false);
cbi.setDefaultValue(false);
return cbi;
}
return null;
}
});
If you want any further info please dont hesitate to ask
All browsers
I have a listgrid with a checkbox item as a custom cell editor. The cell's values are 1 or 0. So before I return the checkbox item i check what value the cell has and afterwards i want to set the value of the checkbox item accordingly. The thing is that the checkbox item does not change it's value and it is always checked as a default no matter what value i set it to. below is the code i tried to making it work.
brightSchedGrid.setEditorCustomizer(new ListGridEditorCustomizer() {
@Override
public FormItem getEditor(ListGridEditorContext context) {
switch (context.getRowNum()) {
case 2:
CheckboxItem cbi = new CheckboxItem();
cbi.setShowLabel(false);
GWT.log(brightSchedGrid.getRecord(2).getAttribute("value").toString());
cbi.setValue(false);
cbi.setDefaultValue(false);
return cbi;
}
return null;
}
});
If you want any further info please dont hesitate to ask
Comment