The appearance of each element in the grid can be customized by setting various properties such as BackColor and ForeColor, however it is also possible to customize the appearance of the entire grid (or just portions) using stylesheets.
Although the grid comes with seven predefined stylesheets, it is possible to create your own using the StyleSheet class.
The following code demonstrates how to use one of the predefined stylesheets and apply it to the grid:
VB.NET | Copy Code |
---|---|
GridControl1.ApplyStyleSheet( StyleSheet.Xceed ) |
C# | Copy Code |
---|---|
gridControl1.ApplyStyleSheet( StyleSheet.Xceed ); |
If you want to create your own stylesheet, for example to alternate the color of the datarows in the grid, you could use the following code:
VB.NET | Copy Code |
---|---|
|
C# | Copy Code |
---|---|
|
Of course there are various other elements that you can customize using stylesheets, so your best option is to play around with them to get the desired appearance.