Version

Setting Alternate Row Colors

You can use the BackColor , BackColor2 , and BackGradientStyle properties off WinGrid’s™ RowAlternateAppearance object to create unique gradients to style the alternating rows. The following example code shows you how this can be achieved at run time.

In Visual Basic:

Private Sub Set_Alternate_Row_Colors_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
	Me.UltraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor = Color.Orange
	Me.UltraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor2 = Color.OrangeRed
	Me.UltraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackGradientStyle = _
	  Infragistics.Win.GradientStyle.Vertical
End Sub

In C#:

private void Set_Alternate_Row_Colors_Load(object sender, EventArgs e)
{
	this.ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor = Color.Orange;
	this.ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor2 =
	  Color.OrangeRed;
	this.ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackGradientStyle =
	  Infragistics.Win.GradientStyle.Vertical;
}
set alternate row colors in ultragrid