GridView.FocusRectStyle Property

Gets or sets a value specifying how the focus rectangle is painted.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(DrawFocusRectStyle.CellFocus)]
[XtraSerializableProperty]
[DXCategory("Appearance")]
public virtual DrawFocusRectStyle FocusRectStyle { get; set; }
<DefaultValue(DrawFocusRectStyle.CellFocus)>
<XtraSerializableProperty>
<DXCategory("Appearance")>
Public Overridable Property FocusRectStyle As DrawFocusRectStyle

Property Value

Type Default Description
DrawFocusRectStyle

CellFocus

A DrawFocusRectStyle enumerator value.

Examples

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;
See Also