Skip to content

Column_Checkbox_State - DataList

Specifies whether a column of a dbGrid/dbList is presented as a checkbox

Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None

Parameters

Parameter Type Description
iCol Integer The column number (0-based)

Syntax

Property Boolean Column_Checkbox_State
Access Type Syntax
Read Access: Get Column_Checkbox_State to BooleanVariable
Write Access: Set Column_Checkbox_State to BooleanVariable/Value

Description

Column_Checkbox_State specifies whether iCol of this dbGrid/dbList is presented as a checkbox. This will be used most-often when a column's database column is defined by its DataDictionary as a checkbox type via Field_CheckBox_Value. This property can be used with dbGrid objects and dbList as well.

Normally this property is set once in your program when the object is being created. If a database column value can be represented as a checkbox, you can set the dbGrid's column to be a checkbox by setting this property to True.

Set Column_Checkbox_State 4 to True

This property may be set dynamically, although such usage would be unusual. If the property is changed when the object is active, you will not see a change in the object's appearance until you redisplay the object. The following sample would toggle a column's checkbox state and update the dbGrid as required.

Procedure ToggleCB4
    Boolean bState

    Get Column_Checkbox_State 4 to bState
    Set Column_Checkbox_State 4 to (not(bState))

    // if the object is active, we must refresh to see changes
    If Active_State send Display
End_Procedure  // ToggleCB4
Col 1 Col 2
Note: Column_xxx states must be set after the Entry_Items, in order for it to take effect.

Default is False, unless the database column is defined as a checkbox column by its DataDictionary Object (DDO) Server.