Column :: addColumn - Add sub column to column
When a control supports hierarchical table headers (multi-line header), the function allows creating sub columns for an upper column. In case of single line headers only columns defined on lowest level will be displayed in header row.
The function adds a column for displaying data from the data source passed in sAccessPath to the region. The passed sAccessPath is interpreted relative to the parent column data source. The type of data reference is passed in eDataReferenceType .
In order to display a column label, an appropriate text might be passed in sLabel .
After changing a list definition by adding columns or regions, the region has to be refreshed by calling refresh() .
When changing column count for single region in a multi-region table, this may conflict with other regions having different column count. In order to avoid this, columns to be extended could be desined by means of a column control, which is used by all regions in a multi-region table.
The column identifier is either the resource identity for the column definition (in case the column has been created from an external resource) or the internal column identifier returned from the ControlContext::addColumn() function.
Implementation overview
- Add column with control definition
Column :: addColumn ( sAccessPath, sLabel, eDataReferenceType, iHeight, iWidth, sControl ) - Add column with dynamic size
Column :: addColumn ( sAccessPath, sLabel, eDataReferenceType ) - Add column with fixed size
Column :: addColumn ( sAccessPath, sLabel, eDataReferenceType, iHeight, iWidth )
Implementation details
-
Add column with control definition
int64 Column  :: addColumn ( odaba::String &sAccessPath, odaba::String &sLabel, odabagui::DataReferenceTypes eDataReferenceType, int32 iHeight, int32 iWidth, odaba::String &sControl )
The function creates a column with fixed column width as being passed in iWidth . When the height passed in iHeight exceeds the maximum height of the other columns, the height becomes the new height of the column or table header. The control name allows providing additional header display options. When size and/or width is 0, values from control definition are used.
The control name may be passed as simple name. In this case, the control has to be defined in the design class for the data type defined in the data source property handle for the region. In order to refer to a control defined in a different class, a scoped name has to be passed (e.g. "VOID::verticalColumn").
- sAccessPath - Data access path
- sLabel
- Control label
The label (caption) is passed as string.
- eDataReferenceType
- Type of data reference
The reference type allows choosing between different ways of accessing a data source.
- iHeight - Hight of rectangle
- iWidth - Width of a rectangle
- sControl
- Control name
The control name is the name of the control resource as being defined within the parent control.
"city" // search city control in current control
"..city" // search city control in parent-parent-control
"address.city" // search city control in subordinated address form
to list
-
Add column with dynamic size
int64 Column  :: addColumn ( odaba::String &sAccessPath, odaba::String &sLabel, odabagui::DataReferenceTypes eDataReferenceType )
The function creates a column with dynamic size, i.e. the column width is determined by the system.
- sAccessPath - Data access path
- sLabel
- Control label
The label (caption) is passed as string.
- eDataReferenceType
- Type of data reference
The reference type allows choosing between different ways of accessing a data source.
to list
-
Add column with fixed size
int64 Column  :: addColumn ( odaba::String &sAccessPath, odaba::String &sLabel, odabagui::DataReferenceTypes eDataReferenceType, int32 iHeight, int32 iWidth )
The function creates a column with fixed column width as being passed in iWidth . When the height passed in iHeight exceeds the maximum height of the other columns, the height becomes the new height of the column or table header.
- sAccessPath - Data access path
- sLabel
- Control label
The label (caption) is passed as string.
- eDataReferenceType
- Type of data reference
The reference type allows choosing between different ways of accessing a data source.
- iHeight - Hight of rectangle
- iWidth - Width of a rectangle
to list