aspnet-devexpress-dot-web-dot-gridviewstyles-a08a4dc8.md
Specifies the appearance of the focused data row.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public GridViewDataRowStyle FocusedRow { get; }
Public ReadOnly Property FocusedRow As GridViewDataRowStyle
| Type | Description |
|---|---|
| GridViewDataRowStyle |
Style settings that specify the focused row appearance.
|
Set the AllowFocusedRow property to true to enable row focus.
When row focus is disabled, the style settings of the focused row are not in effect. To identify the row being edited, use the EditingRowVisibleIndex property.
When cell merge is enabled, ASPxGridView doesn’t support row focus.
The FocusedRow property allows you to specify the appearance of the focused row in markup and in a CSS class.
<dx:ASPxGridView ID="ASPxGridView1" >
<%--...--%>
<Styles>
<FocusedRow BackColor="Brown" ForeColor="Yellow" >
</FocusedRow>
</Styles>
</dx:ASPxGridView>
settings.Styles.FocusedRow.BackColor = System.Drawing.Color.Brown;
settings.Styles.FocusedRow.ForeColor = System.Drawing.Color.Yellow;
#ASPxGridView1 .focusedRowStyle td{
background-color: Brown;
}
<dx:ASPxGridView ID="ASPxGridView1" >
<%--...--%>
<Styles>
<FocusedRow CssClass="focusedRowStyle" />
</Styles>
</dx:ASPxGridView>
<style type="text/css">
.focusedRowStyle {
background-color: Brown;
}
</style>
settings.Styles.FocusedRow.CssClass = "focusedRowStyle";
Run Demo: ASPxGridView - Focused Row
Run Demo: MVCxGridView - FocusedRow
See Also