Version

ActiveRow Property (UltraGridBase)

Returns or sets the active row. This property is not available at design-time.
Syntax
'Declaration
 
Public Property ActiveRow As UltraGridRow
public UltraGridRow ActiveRow {get; set;}
Remarks

Use the ActiveRow property to determine which row is currently active, or change which row is currently active. If you assign an UltraGridRow object to the ActiveRow property, the specified row will become active.

Only one row at a time may be the active row. The active row is formatted using a special Appearance object, as specified by the ActiveRowAppearance property. The active row contains the active cell, which is the cell that will receive input focus when the Grid goes into edit mode. You can determine which cell is the active cell using the ActiveCell property.

If no row is active, this property will return Nothing. To deactivate the active row, set this property to Nothing.

Example
Following code prints out some information about active row.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Button33_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button33.Click

       ' Check to see if there is an active row.
       If Not Me.ultraGrid1.ActiveRow Is Nothing Then
           ' Print out the active row's Index and the band key.
           Debug.WriteLine("ActiveRow's Index = " & Me.ultraGrid1.ActiveRow.Index.ToString() & ", Band = " & Me.ultraGrid1.ActiveRow.Band.Key)

           ' Active row can be a group-by row too.
           If TypeOf Me.ultraGrid1.ActiveRow Is UltraGridGroupByRow Then
               Debug.WriteLine("ActiveRow is a group-by row.")
           End If
       Else
           Debug.WriteLine("There is no active row.")
       End If

   End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

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

	// Check to see if there is an active row.
	if ( this.ultraGrid1.ActiveRow != null )
	{
		// Print out the active row's Index and the band key.
		Debug.WriteLine( "ActiveRow's Index = " + this.ultraGrid1.ActiveRow.Index.ToString( ) + ", Band = " + this.ultraGrid1.ActiveRow.Band.Key );
		
		// Active row can be a group-by row too.
		if ( this.ultraGrid1.ActiveRow is UltraGridGroupByRow )
			Debug.WriteLine( "ActiveRow is a group-by row." );
	}
	else
	{
		Debug.WriteLine( "There is no active row." );
	}

}
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