In this tutorial, you will learn how to use the AlternatingRows property and built-in styles to apply alternating colors to list rows to improve their readability.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1List1.AlternatingRows = True |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1List1.AlternatingRows = true; |
The list has default settings for both the EvenRow and OddRow styles. We will use the default settings first and then change the settings for the EvenRowStyle.
Run the program and observe the following:
C1List1 displays even-numbered rows with a light cyan background.
C1List1 displays data as in the previous figure, except that even-numbered rows now have a light gray background.
This concludes the tutorial.