DataGridView::DataGridViewTopRowAccessibleObject::GetChildCount Method ()

 

Returns the number of children belonging to the accessible object.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual int GetChildCount() override

Return Value

Type: System::Int32

The 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
Return to top
Show: