Skip to main content
Tab

GridViewStyles.FocusedRow Property

Specifies the appearance of the focused data row.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public GridViewDataRowStyle FocusedRow { get; }

Property Value

Type Description
GridViewDataRowStyle

Style settings that specify the focused row appearance.

Remarks

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.

Markup Example

Web Forms

<dx:ASPxGridView ID="ASPxGridView1" >  
    <%--...--%>
    <Styles>  
        <FocusedRow BackColor="Brown" ForeColor="Yellow" >
        </FocusedRow>  
    </Styles>  
</dx:ASPxGridView>

MVC

settings.Styles.FocusedRow.BackColor = System.Drawing.Color.Brown; 
settings.Styles.FocusedRow.ForeColor = System.Drawing.Color.Yellow;

CSS Example

Web Forms

#ASPxGridView1 .focusedRowStyle td{  
    background-color: Brown;  
}  
<dx:ASPxGridView ID="ASPxGridView1" >  
    <%--...--%>
    <Styles>  
        <FocusedRow CssClass="focusedRowStyle" />
    </Styles>  
</dx:ASPxGridView>

MVC

<style type="text/css">
    .focusedRowStyle {
        background-color: Brown;
    }
</style>  
settings.Styles.FocusedRow.CssClass = "focusedRowStyle";

Online Demo

Run Demo: ASPxGridView - Focused Row

Run Demo: MVCxGridView - FocusedRow

See Also