DataGridView::DataGridViewTopRowAccessibleObject::GetChildCount Method ()
.NET Framework (current version)
Returns the number of children belonging to the accessible object.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Return Value
Type: System::Int32The number of child accessible objects belonging to the accessible object.
| Exception | Condition |
|---|---|
| InvalidOperationException | The Owner property is not set. |
The number of child accessible objects that belong to the DataGridView::DataGridViewTopRowAccessibleObject corresponds to the number of visible columns in the DataGridView. If the DataGridView::RowHeadersVisible property is true, the GetChildCount method includes the DataGridViewTopLeftHeaderCell in the count of child accessible objects.
.NET Framework
Available since 2.0
Available since 2.0
Show: