Object Model > True DBGrid Objects and Collections |
True DBGrid provides a rich set of properties, methods, and events that enable you to develop sophisticated database applications. The organization imposed by True DBGrid's object model makes it easier to work with such a large feature set.
Objects and collections that refer to visual entities, such as columns, can be customized at design time or run time. Objects and collections that refer to abstract entities, such as arrays and bookmarks, are only available in code at run time.
When you add True DBGrid to a Visual Basic project, the following controls are added to the toolbox:
True DBGrid ActiveX control. |
|
True DBDropDown ActiveX control. |
The type library for True DBGrid also contains definitions for the following objects:
Represents a column of data within a grid or split. |
|
Transfers data between OLE drag sources and drop targets. |
|
Encapsulates page setup and print job settings. |
|
Transfers data to and from row-based unbound mode events. |
|
Represents a group of adjacent columns that scroll as a unit. |
|
Encapsulates font, color, picture, and formatting information. |
|
Allowable input value for a column, with optional translation. |
A collection is an object used to group similar data items, such as bookmarks, or visual objects, such as grid columns. In general, a group of similar items in True DBGrid is implemented as a collection. Since a collection is an object, you can manipulate it in code just as you would any other object. The type library for True DBGrid contains definitions for the following collections:
Contains zero or more Column objects in a grid or split. |
|
Contains zero or more Error objects associated with a grid. |
|
Contains zero or more Column objects in the grouping area. |
|
Contains zero or more named grid layouts. |
|
Contains one or more PrintInfo objects in a grid. |
|
Contains zero or more selected row bookmarks. |
|
Contains one or more Split objects in a grid. |
|
Contains built-in and user-defined Style objects for a grid. |
|
Contains zero or more ValueItem objects for a column. |
Note: The Errors and GroupColumns collections are available only in the OLE DB grid, and are not available in the legacy (ICursor) version.
When using True DBGrid's storage mode (DataMode 4), you also need to add a reference to the ComponentOne XArrayDB Object to your project. This is not a control, but a reference that defines a single nongraphical object:
Variant array used as a data source in storage mode. |
The following sections provide a brief overview of True DBGrid's objects and collections.