| List for WinForms Task-Based Help > Setting the Foreground Color of a Row > Undo Setting the Foreground Color of a Row |
To undo setting the foreground color of a row, set the FetchRowStyles property to False by adding the following code. In this example the code was added to the Undo button's Click event:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.FetchRowStyles = False |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.FetchRowStyles = false; |
|
This topic illustrates the following:
When the Undo button is clicked, the rows return to the default color.
