Edit

Share via


DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.Navigate Method

Definition

Navigates to another accessible object.

public:
 override System::Windows::Forms::AccessibleObject ^ Navigate(System::Windows::Forms::AccessibleNavigation navigationDirection);
public override System.Windows.Forms.AccessibleObject Navigate (System.Windows.Forms.AccessibleNavigation navigationDirection);
public override System.Windows.Forms.AccessibleObject? Navigate (System.Windows.Forms.AccessibleNavigation navigationDirection);
override this.Navigate : System.Windows.Forms.AccessibleNavigation -> System.Windows.Forms.AccessibleObject
Public Overrides Function Navigate (navigationDirection As AccessibleNavigation) As AccessibleObject

Parameters

navigationDirection
AccessibleNavigation

One of the AccessibleNavigation values.

Returns

An object that's in the specified direction.

Exceptions

.NET 5 and later versions: The Owner property is null.

Remarks

The following table describes which DataGridViewColumnHeaderCell owns the AccessibleObject that is returned by the Navigate method.

Parameter value Description
Right The DataGridViewColumnHeaderCell to the right of the current header cell.
Left The DataGridViewColumnHeaderCell to the left of the current header cell.
Next The DataGridViewColumnHeaderCell after the current header cell.
Previous The DataGridViewColumnHeaderCell before the current header cell.
FirstChild The first DataGridViewColumnHeaderCell. Navigate returns the DataGridViewTopLeftHeaderCell if the RowHeadersVisible property is true.
LastChild The last DataGridViewColumnHeaderCell.

Note

The direction that the Navigate method moves when you specify Next or Previous depends on whether the DataGridView has right-to-left support enabled. For example, if right-to-left support is enabled, Navigate will return the same accessible object when you specify Next or Left. If right-to-left support is not enabled, Navigate will return the same object when you specify Next or Right.

Applies to

See also