Skip to content

CreateColumn - cCJGridColumn

Called as part of the Grid activation process to bind the column to the COM column object and initialize COM properties

Type: Procedure

Parameters

Parameter Type Description
iColumn Integer The column index (piColumnId)

Syntax

Procedure CreateColumn Integer iColumn

Call Example

Send CreateColumn iColumn

Description

When a grid is activated, the grid CreateGridControl message is sent to initialize the grid, create all required COM objects and set all COM properties. As part of this process, the message CreateColumn is sent to every grid column object. This message is used to bind the column object to its COM object and to perform all required column initializations. At the end of CreateColumn process, the OnCreateColumn event is sent.

If you need to customize the column creation process before the COM column object is created, you can augment CreateColumn and add code before you 'forward send' the message. If you need to customize this process after the COM object is created, which is the more likely scenario, you should augment OnCreateColumn.

Although iColumn is passed, you will probably not need to use this, as the value is already available as piColumnId. It is passed primarily to be used as an internal error check.