Export (0) Print
Expand All
Expand Minimize

DataGridTableStyle.ResetAlternatingBackColor Method

Resets the AlternatingBackColor property to its default value.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public void ResetAlternatingBackColor ()
public void ResetAlternatingBackColor ()
public function ResetAlternatingBackColor ()
Not applicable.

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 ShouldSerializeAlternatingBackColor method to determine whether the property value has changed from its default.

The following code example demonstrates the use of this member.

private void myButton1_Click(object sender,EventArgs e)
{
   //Set the 'AlternatingBackColor'.
   myDataGridTableStyle.AlternatingBackColor=Color.Blue;
}
private void myButton2_Click(object sender,EventArgs e)
{
   // Reset the 'AlternatingBackColor'.
   myDataGridTableStyle.ResetAlternatingBackColor();
}

private void myButton1_Click(Object sender, EventArgs e)
{
    //Set the 'AlternatingBackColor'.
    myDataGridTableStyle.set_AlternatingBackColor(Color.get_Blue());
} //myButton1_Click

private void myButton2_Click(Object sender, EventArgs e)
{
    // Reset the 'AlternatingBackColor'.
    myDataGridTableStyle.ResetAlternatingBackColor();
} //myButton2_Click

private void myButton1_Click(Object sender, EventArgs e)
{
    //Set the 'AlternatingBackColor'.
    myDataGridTableStyle.set_AlternatingBackColor(Color.get_Blue());
} //myButton1_Click

private void myButton2_Click(Object sender, EventArgs e)
{
    // Reset the 'AlternatingBackColor'.
    myDataGridTableStyle.ResetAlternatingBackColor();
} //myButton2_Click

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft