[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Collapse]Focus and Navigation
     Focusing Cells
     Moving Row Focus
     Traversing Rows
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Moving Row Focus

Expanded Availability

Rows can be focused if the DataViewBase.NavigationStyle property isn't set to GridViewNavigationStyle.None. To specify the focused row, use the DataViewBase.FocusedRowHandle property. If the specified row isn't visible onscreen, a View is automatically scrolled to make the focused row visible.

If the row focusing is enabled, the GridControl focuses the first row when loaded by default. To load the GridControl without focused rows, set the DataControlBase.AllowInitiallyFocusedRow property to false.

Expanded Moving Row Focus

The focused row is specified by its handle using the DataViewBase.FocusedRowHandle property. The GridControl provides multiple members that you can use to move row focus:

Member Description
DataControlBase.CurrentItem Gets or sets the currently focused data row.
DataViewBase.MoveFirstRow Moves focus to the first visible row or card within a View.
DataViewBase.MovePrevPage Moves focus backward by the number of rows or cards displayed onscreen within a View.
DataViewBase.MovePrevRow Moves focus to the row or card preceding the one currently focused.
DataViewBase.MoveNextRow Moves focus to the row or card following the one currently focused.
DataViewBase.MoveNextPage Moves focus forward by the number of rows or cards displayed onscreen within a View.
DataViewBase.MoveLastRow Moves focus to the last visible row or card within a View.
DataViewBase.MoveFocusedRow Moves focus to the specified row.
GridViewBase.MoveParentGroupRow Moves focus to the group row that owns the currently focused row.

All these methods move focus between visible rows. These methods don't expand collapsed groups.

After the focused row has been changed, the DataControlBase.CurrentItemChanged event is raised.

The number of visible rows is returned by the DataControlBase.VisibleRowCount property. Note that rows contained within collapsed group rows are not taken into account.

Set the DataViewBase.FadeSelectionOnLostFocus property to false to keep the focused row highlighted when the GridControl loses focus.

Expanded See Also

Is this topic helpful?​​​​​​​