Back to Devexpress

DataViewBase.NavigationStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-187c959c.md

latest4.7 KB
Original Source

DataViewBase.NavigationStyle Property

Gets or sets whether row and cell focus is allowed. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public GridViewNavigationStyle NavigationStyle { get; set; }
vb
Public Property NavigationStyle As GridViewNavigationStyle

Property Value

TypeDefaultDescription
GridViewNavigationStyleCell

A value that specifies whether row and cell focus is allowed.

|

Available values:

NameDescription
Row

A View displays only the focused row. The focused cell is not displayed. Data editing is not allowed.

| | Cell |

A View displays the focused row and focused cell. Data editing is allowed.

| | None |

A View displays neither the focused row nor the focused cell. Data editing is not allowed.

|

Remarks

If the NavigationStyle property is GridViewNavigationStyle.Cell, the View displays the focused row and the focused cell. In this case, users are allowed to edit cell values.

The cell focus is hidden if the NavigationStyle property is set to GridViewNavigationStyle.Row. In this case, users cannot edit cell values.

To display neither the focused row nor the focused cell, set the NavigationStyle property to GridViewNavigationStyle.None. In this case, data cannot be edited.

Refer to the following help topic for more information: Focus, Navigation, Selection.

The following code snippets (auto-collected from DevExpress Examples) contain references to the NavigationStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EntityFramework/InstantFeedbackMode/MainWindow.xaml#L27

xml
<dxg:TableView ShowFixedTotalSummary="True" DataSourceRefresh="OnDataSourceRefresh"
                   RowDoubleClickCommand="{Binding RowDoubleClickCommand, ElementName=EditFormBehavior}" NavigationStyle="Row" />
</dxg:GridControl.View>

wpf-data-grid-implement-custom-filtering/CS/CustomFiltering_MVVM/MainWindow.xaml#L31

xml
ShowGroupPanel="False"
                   NavigationStyle="None" />
</dxg:GridControl.View>

wpf-data-grid-summarize-empty-cells/CS/CustomSummary_EmptyCells_CodeBehind/MainWindow.xaml#L18

xml
AutoWidth="True"
NavigationStyle="Cell"
TotalSummaryPosition="Bottom" />

wpf-synchronous-theme-preload-with-splashscreen/CS/ThemePreloadwithSplashscreen/ComplexWindow.xaml#L198

xml
AutoWidth="True"
NavigationStyle="Row"
ShowGroupPanel="False"

wpf-grid-read-only-and-enabled-binding/CS/MainWindow.xaml#L45

xml
TreeColumnFieldName="Name"
NavigationStyle="Cell"
ShowNodeImages="True"

See Also

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace