AddColumn - cCJGridDataSource
Sent by the grid to register a column object in the datasource
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| hoColumn | Handle | Handle of the column object's datasource object |
Syntax
Procedure AddColumn Handle hoColumn
Call Example
Send AddColumn hoColumn
Description
When a grid column object is created, a child grid column datasource object is also created. When the datasource is initialized, this column datasource object must be registered with the datasource object. This determines the binding between the datasource's column array elements and the column objects. other words, this binds the cCJGridColumn object's piColumnId index to tDataSourceRow.sValue[index].
This is sent by the cCJGrid object's ResetGrid message for each column object. The hoColumn parameter passed is the handle to the grid column's datasource object, which is different than the grid column object. When a grid column object is created, it creates a child column datasource object, which is based on the private class cCJGridDataSourceColumn and set to the private property phoDataSourceColumnClass.
A datasource object should never directly communicate with a column object. It should communicate with the grid column datasource object. That object has a limited interface and is used to communicate with the actual column object.
You will never send this message and you would only augment it if you were creating your own datasource class. Even then, you are not likely to use it.