Skip to main content

How to: Make the entire focused row highlighted

This example shows how to paint the focused cell using the same appearance as the entire focused row:

Grid_HighlightEntireFocusedRow

// 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;