DataGridTableStyle.ResetAlternatingBackColor Method

Definition

Resets the AlternatingBackColor property to its default value.

public:
 void ResetAlternatingBackColor();
public void ResetAlternatingBackColor ();
member this.ResetAlternatingBackColor : unit -> unit
Public Sub ResetAlternatingBackColor ()

Examples

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;
   }

   void myButton2_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Reset the 'AlternatingBackColor'.
      myDataGridTableStyle->ResetAlternatingBackColor();
   }
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 Sub myButton1_Click(sender As Object, e As EventArgs)
   'Set the 'AlternatingBackColor'.
   myDataGridTableStyle.AlternatingBackColor = Color.Blue
End Sub

Private Sub myButton2_Click(sender As Object, e As EventArgs)
   ' Reset the 'AlternatingBackColor'.
   myDataGridTableStyle.ResetAlternatingBackColor()
End Sub

Remarks

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.

Applies to