Back to Devexpress

GridViewStyles.SelectedRow Property

aspnet-devexpress-dot-web-dot-gridviewstyles-0a228c08.md

latest2.0 KB
Original Source

GridViewStyles.SelectedRow Property

Specifies the appearance of the selected data row.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public GridViewDataRowStyle SelectedRow { get; }
vb
Public ReadOnly Property SelectedRow As GridViewDataRowStyle

Property Value

TypeDescription
GridViewDataRowStyle

Style settings that specify the selected row appearance.

|

Remarks

Enable row selection and specify the SelectedRow property to define the appearance of the selected row.

The style settings of the selected row are not in effect when row selection is disabled.

The SelectedRow property allows you to specify the appearance of the selected row in markup and in a CSS class.

Markup Example

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

CSS Example

css
#ASPxGridView1 .selectedRowStyle td{  
    background-color: Brown;  
}
aspx
<dx:ASPxGridView ID="ASPxGridView1" >  
    <%--...--%>
    <Styles>  
        <SelectedRow CssClass="selectedRowStyle" />
    </Styles>  
</dx:ASPxGridView>

See Also

GridViewStyles Class

GridViewStyles Members

DevExpress.Web Namespace