Version

ExpandAll Method (RowsCollection)

Expand all rows in the collection. UltraGrid.InitializeLayout
Syntax
'Declaration
 
Public Sub ExpandAll( _
   ByVal recursive As Boolean _
) 
public void ExpandAll( 
   bool recursive
)

Parameters

recursive
Specifies whether to recursively expand descendant rows as well.
Example
Following code shows how to expand or collapse all rows in a rows collection with ExpandAll and CollapseAll methods.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged

      If Me.CheckBox1.Checked Then
          ' Expand all the rows. You can pass in true to recursively expand all the 
          ' descendant rows as well.
          Me.UltraGrid1.Rows.ExpandAll(False)
      Else
          ' Collapse all the rows. You can pass in true to recursively collapse all the
          ' descendant rows as well.
          Me.UltraGrid1.Rows.CollapseAll(False)
      End If

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

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

	if ( this.checkBox1.Checked )
	{
		// Expand all the rows. You can pass in true to recursively expand all the 
		// descendant rows as well.
		this.ultraGrid1.Rows.ExpandAll( false );
	}
	else
	{
		// Collapse all the rows. You can pass in true to recursively collapse all the
		// descendant rows as well.
		this.ultraGrid1.Rows.CollapseAll( false );
	}

}
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