Version

Expanding All Rows in WinGrid

Use the ExpandAll method to expand all the rows in the grid. This could be useful if you have the WinGrid™ set to OutlookGroupBy mode, and have it sorted by predefined columns. You can use the ExpandAll to expand all the rows in each group. The follow code demonstrates this idea.

In Visual Basic:

Imports Infragistics.Win.UltraWinGrid
...
Private Sub Expand_All_Rows_in_WinGrid_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
	Me.UltraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy
	Me.UltraGrid1.DisplayLayout.Bands(0).SortedColumns.Add("Country", False, True)
	Me.UltraGrid1.DisplayLayout.Bands(0).SortedColumns.Add("City", False, True)
	Me.UltraGrid1.Rows.ExpandAll(True)
End Sub

In C#:

using Infragistics.Win.UltraWinGrid;
...
private void Expand_All_Rows_in_WinGrid_Load(object sender, EventArgs e)
{
	this.ultraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;
	this.ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Add("Country", false, true);
	this.ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Add("City", false, true);
	this.ultraGrid1.Rows.ExpandAll(true);
}
expand all rows in ultragrid