バージョン

CollapseAll メソッド (RowsCollection)

コレクション内のすべての行を縮小します。
シンタックス
'宣言
 
Public Sub CollapseAll( _
   ByVal recursive As Boolean _
) 
public void CollapseAll( 
   bool recursive
)

パラメータ

recursive
解説

以下のサンプル コードは、ultraGrid1 のすべての行を縮小します。

C#:

          private void button1_Click(object sender, System.EventArgs e)
          {
          // Collapse all the rows recursively.
          //
          this.ultraGrid1.Rows.CollapseAll( true );
          }
        
使用例
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 );
	}

}
参照