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:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1TrueDBGrid1.Styles("Normal").Backcolor = System.Drawing.Color.Gray |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1TrueDBGrid1.Styles["Normal"].Backcolor = System.Drawing.Color.Gray; |