Checkbox - Bool type

TreeGrid documentation

Bool is boolean type contains only two values 0 and 1.
Or it is possible to show three states ("", 0, 1) when set CanEmpty='1'.
It is shown as checkbox or radio button.
It supports radio groups - only one radio inside group can be checked.
Filter cell Bool type button automatically hides operator menu and sets CanEmpty='1' to have filter off option.
<C> <cell> string

Type

["Text"] Type = "Bool"
To define Bool type, set column or cell attribute Type to "Bool".
new 6.0 upd 9.3 <C> <cell> int

CanEmpty

[0]
If the Bool cell can be empty.
If set, the Bool cell supports three states: "", 0, 1.
The states are cycled on click - for CanEmpty = 1 is ("",1,0,"",1,0,...), for 2 is ("",0,1,"",0,1) and (since 9.3) for 3 is ("",1,0,1,0,...) and for 4 is ("",0,1,0,1,...)
CanEmpty is supported only by BoolIcon = 0 or 2 and ignores BoolGroup.
If set, filter shows operator menu to let a use filter according to all three values.
new 6.0 upd 11.0 <C> <cell> type

BoolIcon

[0]
Which icon will displayed in the cell.
Since 11.0 it can be also first character separated array of strings as icon files for 0, 1 and empty value, e.g. BoolIcon="|Off.gif|On.gif|Empty.gif"
There can be also three more icons for CanEdit='0' state, e.g. BoolIcon="|Off.gif|On.gif|Empty.gif|OffRO.gif|OnRO.gif|EmptyRO.gif"
0 - Checkbox image
1 - Radio button image
2 - Checkbox image vertically centered, slightly slower than 0
3 - Radio button image vertically centered, slightly slower than 0
4 - <input type='checkbox'>, it is faster than icons especially in IE, use it when many Bools are rendered in grid (500+).
5 - <input type='radio'>, it is faster than icons especially in IE, use it when many Bools are rendered in grid (500+).
6 -  X or     , it is faster than icons especially in IE strict mode, use it when many Bools are rendered in grid (500+).
new 11.0 <C> <cell> int

BoolIconWidth

[18]
Width in pixels of custom icons in BoolIcon (if BoolIcon is set to array of strings).
new 6.0 <Cfg> int

BoolChars

["X?"]
Three characters to show in Bool type cell with BoolIcon='6'.
In order for 0, 1, empty.
new 6.0 <C> <cell> int

BoolGroup

[0]
An index of radio group of Bool cells in column.
Only one cell in the group of rows (with the same BoolGroup) can be checked.
When a user checks some radio, the previously checked radio in the group is unchecked.
new 6.0 <C> <cell> int

Radio

[0]
An index of radio group of Bool cells in row.
Only one cell in the group of cells (with the same Radio) can be checked.
When a user checks some radio, the previously checked radio in the group is unchecked.
new 6.0 <C> <cell> bool

Uncheck

[1]
If all the checkboxes with the same BoolGroup or Radio can be empty - a user can uncheck the checked radio.
new 12.0 API method bool

SetBool

(TRow row, string col, type value = null, bool test = 0)
Sets the Bool cell value to value. It is affected by BoolGroup, Radio and Uncheck attributes.
value can be 1 for on, 0 for off, empty string for clear and null for change.
If set test, does not change anything, just checks the change possibility.
Returns true for change, otherwise false.

<Actions>

ChangeBool ...F

Attached to events OnEnter, OnSpaceEdit, OnClickEditBool
Changes the Bool value.
new 12.0 <Actions>

CheckBool ...F

Not attached to any event
Sets the Bool value to 1.
new 12.0 <Actions>

UncheckBool ...F

Not attached to any event
Sets the Bool value to 0.
new 12.0 <Actions>

ClearBool ...F

Not attached to any event
Sets the Bool value to empty string, if CanEmpty=1.