Infragistics(R) NetAdvantage(R) Windows Forms
ActiveRowAppearance Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridOverride Class : ActiveRowAppearance Property

Returns or sets the active row's Appearance object.

Syntax

Visual Basic (Declaration) 
Public Property ActiveRowAppearance As Infragistics.Win.AppearanceBase
C# 
public Infragistics.Win.AppearanceBase ActiveRowAppearance {get; set;}

Example

Following code sets the ActiveRowAppearance on the layout's override and a band's override.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button28_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button28.Click

      ' ActiveRowAppearance appearance applies to the row that's active in the UltraGrid. 
      ' This is the Row that's returned by ActiveRow property off the UltraGrid.

      ' Set the ActiveRowAppearance on the layout's Override so that it applies to the active 
      ' row in any band.
      Me.UltraGrid1.DisplayLayout.Override.ActiveRowAppearance.BackColor = Color.LightYellow

      ' You can override that grid-wide setting for a particular band by setting it on the
      ' override of that band.
      Me.UltraGrid1.DisplayLayout.Bands(0).Override.ActiveRowAppearance.BackColor = Color.LightGreen

  End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button28_Click(object sender, System.EventArgs e)
{

	// ActiveRowAppearance appearance applies to the row that's active in the UltraGrid. 
	// This is the Row that's returned by ActiveRow property off the UltraGrid.

	// Set the ActiveRowAppearance on the layout's Override so that it applies to the active 
	// row in any band.
	this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.BackColor = Color.LightYellow;

	// You can override that grid-wide setting for a particular band by setting it on the
	// override of that band.
	this.ultraGrid1.DisplayLayout.Bands[0].Override.ActiveRowAppearance.BackColor = Color.LightGreen;

}

Remarks

The ActiveRowAppearance property is used to specify the appearance of the active row (as determined by the ActiveRow property). When you assign an Appearance object to the ActiveRowAppearance property, the properties of that object will be applied to any row that becomes the active row. You can use the ActiveRowAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active row, for example:

UltraWinGrid1.Override.ActiveRowAppearance.BackColor = vbBlue

Because you may want the active row to look different at different levels of a hierarchical record set, ActiveRowAppearance is a property of the UltraGridOverride object. This makes it easy to specify different active row appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the grid level to determine the properties for that band. In other words, any band without an override will use the grid's override, therefore the active row in that band will use the grid-level setting of ActiveRowAppearance.

See Also