NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.IsExpanded

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;

Parameters

rowNumber
The number of the row in question.

Return Value

true if the node is expanded; otherwise, false.

Example [Visual Basic]

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

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | Collapse