GridView.SelectedRowStyle Property
Assembly: System.Web (in system.web.dll)
Use the SelectedRowStyle property to control the appearance of the selected row in a GridView control. This property is read-only; however, you can set the properties of the TableItemStyle object it returns. The properties can be set declaratively using one of the following methods:
-
Place an attribute in the opening tag of the GridView control in the form Property-Subproperty, where Subproperty is a property of the TableItemStyle object (for example, SelectedRowStyle-ForeColor).
-
Nest a <SelectedRowStyle> element between the opening and closing tags of the GridView control.
The properties can also be set programmatically in the form Property.Subproperty (for example, SelectedRowStyle.ForeColor). Common settings usually include a custom background color, foreground color, and font properties.
Reference
GridView ClassGridView Members
System.Web.UI.WebControls Namespace
TableItemStyle
GridView.AlternatingRowStyle Property
GridView.EditRowStyle Property
GridView.FooterStyle Property
GridView.HeaderStyle Property
GridView.EmptyDataRowStyle Property
GridView.PagerStyle Property
GridView.RowStyle Property