| |||||
DataControlField.ItemStyle PropertySystem.Web.UI.WebControls Namespace DataControlField Class .NET Framework version 2.0 Sets or retrieves the style properties for the individual columns in a DataControlField. Syntax
Property ValueA TableItemStyle object that defines the style properties for the individual columns in a DataControlField. RemarksUse the ItemStyle property to provide a custom style for the individual columns in types that derive from the DataControlField class. Common style attributes that can be set include forecolor, backcolor, font, and content alignment within the cell. Providing different row styles enhances the appearance of the DataControlField control. The ItemStyle subproperties can be set declaratively using either of the following methods:
The subproperties can also be set programmatically in the form ItemStyle.Property. For a list of style properties that can be set, see the TableItemStyle class. ExampleThe below snippet shows how to set the ItemStyle for a BoundField column in a GridView control at design time. <asp:boundfield headertext = "Price"
datafield = "UnitPrice"
htmlencode=false
dataformatstring = "{0:n2}"
itemstyle-horizontalalign = "right" />
See AlsoDataControlField Members ControlStyle FooterStyle HeaderStyle |
| ||||
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