Version

IsExpandable Property (UltraGridRow)

Returns true if the band's Expandable property is true and the band has child bands that aren't hidden.
Syntax
'Declaration
 
Public Overridable ReadOnly Property IsExpandable As Boolean
public virtual bool IsExpandable {get;}
Example
Following code toggles a row's Expanded status.

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

   Private Sub Button54_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button54.Click

       Dim row As UltraGridRow = Me.UltraGrid1.Rows(0)

       ' Check to see if the row is expandable which depends on factors like whether
       ' the row has any child rows and whether the band associated with it is expandable.
       ' Return if the row is not expandable
       If Not row.IsExpandable Then
           Return
       End If

       ' Toggle the row's expanded status.
       If Not row.Expanded Then
           ' Set the Expanded to true to expand the row.
           row.Expanded = True
       Else
           ' Set the Expanded to false to collapse the row.
           row.Expanded = False
       End If

       ' IsExpanded property indicates whether the row is actually expanded. For example, If you
       ' were to set Expanded to true on a row that wasn't expandable (ie IsExpandable returned
       ' false), Expanded property would return true even thought the row wasn't actually expanded.
       ' However IsExpanded would rerturn false indicating the true status of the row's expansion
       ' status.
       Debug.WriteLine("Is row actually expanded ? " & row.IsExpanded)

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

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

	UltraGridRow row = this.ultraGrid1.Rows[0];

	// Check to see if the row is expandable which depends on factors like whether
	// the row has any child rows and whether the band associated with it is expandable.
	// Return if the row is not expandable
	if ( !row.IsExpandable )				
		return;

	// Toggle the row's expanded status.
	if ( !row.Expanded )
	{
		// Set the Expanded to true to expand the row.
		row.Expanded = true;
	}
	else
	{
		// Set the Expanded to false to collapse the row.
		row.Expanded = false;
	}

	// IsExpanded property indicates whether the row is actually expanded. For example, If you
	// were to set Expanded to true on a row that wasn't expandable (ie IsExpandable returned
	// false), Expanded property would return true even thought the row wasn't actually expanded.
	// However IsExpanded would rerturn false indicating the true status of the row's expansion
	// status.
	Debug.WriteLine( "Is row actually expanded ? " + row.IsExpanded );

}
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