DataGridTableStyle::ResetSelectionForeColor Method ()
.NET Framework (current version)
Resets the SelectionForeColor property to its default value.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
You typically use this method if you are either creating a designer for the DataGridTableStyle or creating your own control incorporating the DataGridTableStyle. You can use the ShouldSerializeSelectionForeColor method to determine whether the property value has changed from its default.
The following code example demonstrates the use of this member.
// String variable used to show message. String^ myString = "Fore color changed from: "; // Store current foreground color of selected cells. Color myCurrentColor = customersStyle->SelectionForeColor; myString = String::Concat( myString, myCurrentColor ); // Reset selection fore color to default. customersStyle->ResetSelectionForeColor(); myString = String::Concat( myString, " to " ); myString = String::Concat( myString, customersStyle->SelectionForeColor ); // Show information about changes in color setting. MessageBox::Show( myString, "Selection fore color information" );
.NET Framework
Available since 1.1
Available since 1.1
Show: