You can change the appearance of the overall list at design time by using .NET's collection editors to modify the GridStyleCollection object. For example, to force all column headers to center their caption text, you can change the HorizontalAlignment property of the built-in Heading style to Center.
The following statement accomplishes the same result in code:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1List1.Styles("Heading").HorizontalAlignment = C1.Win.C1List.AlignHorzEnum.Center |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1List1.Styles["Heading"].HorizontalAlignment = C1.Win.C1List.AlignHorzEnum.Center; |
However, you are not required to use the Style Collection Editor or manipulate named members of the GridStyleCollection in code, as the list and its component objects expose several properties that return Style objects. As the next section describes, you can fine tune the appearance of the list by manipulating these objects directly. For more information see Using the Style Collection Editor.