Gets a value that indicates whether a specified row's node is expanded or collapsed.
[Visual Basic] Public Function IsExpanded( _ ByVal rowNumber As Integer _ ) As Boolean [C#] public bool IsExpanded( int rowNumber ); [C++] public: bool IsExpanded( int rowNumber ); [JScript] public function IsExpanded( rowNumber : int ) : Boolean;
true if the node is expanded; otherwise, false.
The following example tests each row in the grid, and collapses it, if it is expanded.
[Visual Basic]
Dim i As Integer For i = 0 to DataGrid1.CurrentGridTable.DataTable.Rows.Count - 1 If DataGrid1.IsExpanded(i) Then DataGrid1.Collapse i Console.WriteLine("Row " & i & " was expanded") Next i
DataGrid Class | DataGrid Members | System.WinForms Namespace | Collapse