ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Understanding the Object Model and Property Access

True DBGrid for .NET supports a rich object model that reflects the organization of its visual components. Therefore, in order to customize a grid's appearance and behavior, you need to know how the Properties window and collection editors reflect the grid’s object model.

A split is similar to the split window features of products such as Microsoft Excel and Word. Splits can be used to present data in multiple vertical or horizontal panes. These panes, or splits, can display data in different colors and fonts. The panes can scroll as a unit or individually, and they can display different sets of columns or the same set. Splits can also be used to prevent one or more columns or rows from scrolling. By default, a grid contains a single split comprising all of its columns. Note that most of the split properties are not present in the main Properties window. For example, the AlternatingRows property cannot be set without opening up the Split Collection editor and modifying the Split object, because the value of this property can vary from split to split. The term split-specific is used to describe such properties, since they apply to individual splits rather than the grid as a whole.

Conversely, the term global is used to describe properties that apply to the grid as a whole, such as DataView and BorderStyle. Global properties are accessible through the Properties window, which is initially located in the lower right of the .NET IDE. The latter also shows extender properties specific to the Visual Basic environment, such as Align and Tag.

The distinction between split-specific and global properties also extends to the two column objects which represent the columns of data within the grid. Both of these objects govern a column’s properties. The C1DataColumn object contains all of the column properties related to data access and formatting. The C1DisplayColumn object contains all column properties related to the column’s visual display. The C1DataColumn properties are global column properties. These are properties that apply to all of the columns in the grid, no matter their placement among the splits. For instance, when a column is added or removed, the associated C1DataColumn would be added or removed. On the other hand, the C1DisplayColumn properties are split-specific properties. Setting one of these properties in one split does not mean that the properties are then set in all splits. 


Accessing Global Grid Properties

Accessing Split-Specific Properties

Accessing Column Properties


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.