Declaring Grid Objects
A simple grid control is created by declaring a grid object based on the cCJGrid class.
Object oCustomerGrid is a cCJGrid
Set Size to 150 271
Set Location to 13 11
. . .
End_Object
In the Studio, this would be done by dragging a cCJGrid from the Class Palette onto your container object (view, dialog, etc.) in the Visual Designer.
The grid's data source is created internally when the grid object is created. The data source is based on the cCJGridDataSource class, and a handle to this internally created object can be retrieved via the grid's phoDataSource property.
Grid columns are created by declaring column objects based on the cCJGridColumn class.
Object oNumber_col is a cCJGridColumn
Set piWidth to 37
Set psCaption to "Number"
End_Object
Column objects for a grid must be nested inside (child objects of) the grid object. The order that the column objects are declared determines the initial left-to-right order of the columns in the grid.
In the Studio, you create a column by dragging a cCJGridColumn from the Class Palette onto your grid object in the Visual Designer. You can change the column ordering by dragging and dropping the column header to the desired position.