Version

UltraGridRow Class

Represents a row from the attached data source.
Syntax
'Declaration
 
Public Class UltraGridRow 
   Inherits ActivateableGridItemBase
   Implements Infragistics.Shared.ISelectableItem, Infragistics.Shared.ISparseArrayItem, Infragistics.Shared.ISparseArrayMultiItem, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider 
public class UltraGridRow : ActivateableGridItemBase, Infragistics.Shared.ISelectableItem, Infragistics.Shared.ISparseArrayItem, Infragistics.Shared.ISparseArrayMultiItem, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider  
Example
Following code expands the ancestors of the child row of the first row in the UltraGrid to show how ExpandAncestors works. The UltraGrid must have been bound to a data souce with multiple bands. And also it assumes that the row 0 has a child row.

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

   Private Sub Button62_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button62.Click

       ' Get the first child row of the first row in the UltraGrid.
       Dim childRow As UltraGridRow = Me.ultraGrid1.Rows(0).GetChild(Infragistics.Win.UltraWinGrid.ChildRow.First)

       ' AllAncestorsExpanded indicate whether all the ancestors of a row are expanded. 
       ' Write out this property's value before calling ExpandAncestors.
       Debug.WriteLine("Before calling ExpandAncestors, AllAncestorsExpanded = " & childRow.AllAncestorsExpanded)

       ' Expand all of its ancestors if the aren't already expanded.
       childRow.ExpandAncestors()

       ' After calling ExpandAncestors, AllAncestorsExpanded should be true (unless ofcourse 
       ' you cancel the BeforeRowExpanded event to prevent expanding rows).
       Debug.WriteLine("After calling ExpandAncestors, AllAncestorsExpanded = " & childRow.AllAncestorsExpanded)

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

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

	// Get the first child row of the first row in the UltraGrid.
	UltraGridRow childRow = this.ultraGrid1.Rows[0].GetChild( Infragistics.Win.UltraWinGrid.ChildRow.First );
	
	// AllAncestorsExpanded indicate whether all the ancestors of a row are expanded. 
	// Write out this property's value before calling ExpandAncestors.
	Debug.WriteLine( "Before calling ExpandAncestors, AllAncestorsExpanded = " + childRow.AllAncestorsExpanded );

	// Expand all of its ancestors if the aren't already expanded.
	childRow.ExpandAncestors( );
	
	// After calling ExpandAncestors, AllAncestorsExpanded should be true (unless ofcourse 
	// you cancel the BeforeRowExpanded event to prevent expanding rows).
	Debug.WriteLine( "After calling ExpandAncestors, AllAncestorsExpanded = " + childRow.AllAncestorsExpanded );

}
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