Back to Devexpress

GridOptionsNavigation.AllowHeaderNavigation Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsnavigation.md

latest3.9 KB
Original Source

GridOptionsNavigation.AllowHeaderNavigation Property

Gets or sets whether a user can focus column headers and navigate between them with the keyboard.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowHeaderNavigation { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Overridable Property AllowHeaderNavigation As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A DefaultBoolean value that specifies whether a user can focus column headers and navigate between them with the keyboard.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowHeaderNavigation
GridView

.OptionsNavigation .AllowHeaderNavigation

| | WinExplorerView |

.OptionsNavigation .AllowHeaderNavigation

|

Remarks

Use the AllowHeaderNavigation property to activate or deactivate keyboard navigation to column headers for an individual View:

csharp
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.Utils;

public partial class Form1 : XtraForm {

    public Form1() {
        InitializeComponent();
        gridView1.OptionsNavigation.AllowHeaderNavigation = DefaultBoolean.True;
    }
}
vb
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.Utils

Public Partial Class Form1
    Inherits XtraForm

    Public Sub New()
        InitializeComponent()
        gridView1.OptionsNavigation.AllowHeaderNavigation = DefaultBoolean.True
    End Sub
End Class

To control keyboard navigation to column headers in the entire application, use the WindowsFormsSettings.KeyboardNavigationExtensions property.

For a list of related keyboard navigation capabilities, refer to the following help topic: Keyboard Navigation.

See Also

KeyboardNavigationExtensions

Accessibility Support

GridOptionsNavigation Class

GridOptionsNavigation Members

DevExpress.XtraGrid.Views.Grid Namespace