GridViewStyles.FocusedRow Property
Gets the style settings used to paint the currently focused data row.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
GridViewDataRowStyle | A GridViewDataRowStyle object that provides style settings used to paint the currently focused data row. |
Remarks
To specify style settings used to paint data rows, use the GridViewStyles.Row property.
Note
The FocusedRow property is not in effect if cell merging is enabled.
Example
The example bellow illustrates how to paint the focused row in two ways:
use the FocusedRow property:
WebForms:
<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;
use the CSS class:
WebForms:
#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
WebForms: ASPxGridView - Focused Row
See Also