| |||||||||
DataControlField.ControlStyle PropertySystem.Web.UI.WebControls Namespace DataControlField Class .NET Framework version 2.0 Sets or retrieves the style properties of server controls contained in a DataControlField. Syntax
Property ValueA Style that defines the style properties of server controls contained in a DataControlField. RemarksUse the ControlStyle property to provide a custom style for server controls contained in types that derive from the DataControlField class. Common style attributes that can be set include forecolor, backcolor, font, and content alignment within the field. This property does not affect all derived types. For example, the BoundField control typically displays text data and contains only TextBox controls, and is only affected by the ControlStyle property when in edit mode. Field types such as ButtonField and CheckBoxField can be affected by the ControlStyle property, depending on the specific configuration of the controls contained in the field. For example, the ButtonField control can be rendered as a Button, LinkButton, or ImageButton control. While a LinkButton is affected by font attributes, a Button control is not. The ControlStyle subproperties can be set declaratively using either of the following methods:
The subproperties can also be set programmatically in the form ControlStyle.Property. For a list of style properties that can be set, see the Style class. ExampleThe following examples demonstrate using the ControlStyle property in different scenarios.
See AlsoDataControlField Members FooterStyle HeaderStyle ItemStyle |
| ||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme