Back to Devexpress

How to: Make the entire focused row highlighted

windowsforms-11862-controls-and-libraries-data-grid-examples-navigation-and-selection-how-to-make-the-entire-focused-row-highlighted.md

latest995 B
Original Source

How to: Make the entire focused row highlighted

  • Nov 13, 2018

This example customizes appearance settings of the focused cell:

csharp
// Make the grid read-only.
gridView1.OptionsBehavior.Editable = false;
// Prevent the focused cell from being highlighted.
gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
// Draw a dotted focus rectangle around the entire row.
gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
vb
' Make the grid read-only.
gridView1.OptionsBehavior.Editable = False
' Prevent the focused cell from being highlighted.
gridView1.OptionsSelection.EnableAppearanceFocusedCell = False
' Draw a dotted focus rectangle around the entire row.
gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus