ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Style Object

Style objects encapsulate font, color, picture, and formatting information for a C1TrueDBGrid, C1TrueDBDropDown, Split, or C1DisplayColumn object. The Style object is a very flexible and powerful tool that provides Excel- and Word-like formatting capabilities for controlling the appearance of the grid's display.

When a C1TrueDBGrid or C1TrueDBDropDown control is created, it contains ten built-in styles. Modify the built-in styles or add custom styles either in the designer or in code. Both controls also support several optional events that use Style objects to convey formatting information on a per-cell or per-row basis. The object can be accessed as follows:

·      Visual Basic

Me.C1TrueDBGrid1.Styles("Normal").Backcolor = System.Drawing.Color.Gray

·      C#

this.C1TrueDBGrid1.Styles["Normal"].Backcolor = System.Drawing.Color.Gray;

·      Delphi

Self.C1TrueDBGrid1.Styles['Normal'].Backcolor := System.Drawing.Color.Gray;

See Also

How to Use Styles

Using the C1TrueDBGrid Style Editor

Reference Topics

C1.Win.C1TrueDBGrid.Style Properties


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