[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Collapse]Grid View
    Main Features
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Data Shaping and Manipulation
    [Collapse]Focus and Navigation
      Focused Row
     [Expand]Paging and Scrolling
      Keyboard Navigation
    [Expand]Data Editing and Validation
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Card View
  [Expand]Pivot Grid
   Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Focused Row

The ASP.NET MVC GridView extension provides the Focused Row feature. This feature is disabled by default. To enable it, set the ASPxGridViewBehaviorSettings.AllowFocusedRow (via GridViewSettings.SettingsBehavior.AllowFocusedRow) option to true.

The style settings used to paint the focused data row can be accessed and customized using the GridViewStyles.FocusedRow (via GridViewSettings.Styles.FocusedRow) property. The focused group row's appearance can be customized using the GridViewStyles.FocusedGroupRow (via GridViewSettings.Styles.FocusedGroupRow) property.

Expanded Moving Focus on the Server Side

On the server side, you can identify a focused row using the ASPxGridView.FocusedRowIndex (via MVCxGridView.FocusedRowIndex) property. You can use this property to move row focus within the entire grid. Note that the grid will automatically open the required page and focus the required row.

View code:

Expanded Moving Focus on the Client Side

End-users can move row focus by clicking rows. To identify the currently focused row, use the ASPxClientGridView.GetFocusedRowIndex (via MVCxClientGridView.GetFocusedRowIndex) client method. To change row focus, use the ASPxClientGridView.SetFocusedRowIndex (via MVCxClientGridView.SetFocusedRowIndex) client method.

To respond to row focus changes, handle the ASPxClientGridView.FocusedRowChanged (via MVCxClientGridView.FocusedRowChanged) client event.


You can only focus a row that is currently visible on screen. If you wish to focus rows that are not visible (using a client API), you should enable row focus processing on the server side. To do this, handle the ASPxClientGridView.FocusedRowChanged (via MVCxClientGridView.FocusedRowChanged) client event and set the ASPxClientProcessingModeEventArgs.processOnServer property value to true, as shown in the example below.

In this case, the GridView extension will automatically open the required page and focus the required row.


The example below demonstrates how to focus rows on the client side using the client-side API.

View code:

Partial View code:

Expanded See Also

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