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