| Object Model > GridStyleCollection Object > Style Object |
Style objects encapsulate font, color, picture, and formatting information for a C1List, C1Combo, Split, or C1DataColumn 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 list's display.
When a C1List or C1Combo control is created, it contains ten built-in styles. You can modify the built-in styles or add your own 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. You can access the object as follows:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.Styles("Normal").Backcolor = System.Drawing.Color.Gray
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.Styles["Normal"].Backcolor = System.Drawing.Color.Gray; |
|