Version

ActiveRowAppearance Property

Returns or sets the active row's Appearance object.
Syntax
'Declaration
 
Public Property ActiveRowAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase ActiveRowAppearance {get; set;}
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.

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

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

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also