--Work with Checkboxes
1 post
• Page 1 of 1
--Work with Checkboxes
This article is outdated - please use our new system at
https://doc.sibvisions.com
If you need native Checkboxes which are automatically bound to your model, instead of fake "ChoiceCellEditor checkboxes", you can use UICheckBoxCellEditor.
But be aware that such native checkboxes only have 2 states and 2 values (selected or unselected, e.g. Y or N). You can't set a custom value for null/empty. This would be possible with UIChoiceCellEditor.
The advantage of native checkboxes is that they will fit your Look and Feel. But this would be also possible with custom images and choice cell editors.
How to use the checkbox cell editor?
The syntax is similar to ChoiceCellEditors, e.g.
rowDef.getColumnDefinition("CHOOSE").getDataType().
setCellEditor(ApplicationUtil.YESNO_CHECKBOX);
setCellEditor(ApplicationUtil.YESNO_CHECKBOX);
The ApplicationUtil defines default cell editors. The YESNO_CHECKBOX is defined as:
It's also possible to define default checkbox cell editors for an application:
-
Development@SIB - Posts: 325
- Joined: Mon Sep 28, 2009 1:54 pm
1 post
• Page 1 of 1