ColumnObject - cCJGrid
Returns the column object for the passed column index
Type: Function
Return Data Type: Handle
Parameters
| Parameter | Type | Description |
|---|---|---|
| iColumn | Integer | Column index (zero-based) |
Syntax
Function ColumnObject Integer iColumn Returns Handle
Call Example
Get ColumnObject iColumn to HandleVariable
Description
ColumnObject returns the column object for the passed column index. You could use this along with ColumnCount to enumerate all columns. The column index represents the order in which the columns were created. This also represents the order in which the column data is stored in the datasource object. This index will be the same as the column's piColumnId property.
Get ColumnCount to iColumns
For iColumn from 0 to (iColumns-1)
Get ColumnObject iColumn to hoColumn
Set psCaption of hoColumn to ("Column" * String(iColumn))
Loop
Note that this order may not be the same as the display order because columns can be moved and hidden. If you wish to get the display order of columns, use ColumnObjectsInDisplayOrder
See Also
ColumnCount | ColumnObjectsInDisplayOrder | SelectedColumn | SelectedColumnObject | piColumnId
Return Value
Returns the column object for the passed column index.