次の方法で共有


DataGrid.Collapse メソッド

子リレーションシップがすべての行または指定した行に存在する場合、子リレーションシップを折りたたみます。

Public Sub Collapse( _
   ByVal row As Integer _)
[C#]
public void Collapse(introw);
[C++]
public: void Collapse(introw);
[JScript]
public function Collapse(
   row : int);

パラメータ

  • row
    折りたたむ行の番号。-1 に設定すると、行がすべて折りたたまれます。

解説

IsExpanded メソッドを使用して、行を展開するかどうかを決定します。

使用例

[Visual Basic] System.Windows.Forms.DataGrid コントロールのすべての行を折りたたむ例を次に示します。

 

 DataGrid1.Collapse( -1 )
    

[C#, C++, JScript] C#、C++、および JScript のサンプルはありません。Visual Basic のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

DataGrid クラス | DataGrid メンバ | System.Windows.Forms 名前空間 | IsExpanded