DataGridView.DataGridViewTopRowAccessibleObject.GetChildCount Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the number of children belonging to the accessible object.

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

public override int GetChildCount()

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: