| ||||||||||||||||||||||||||||||||||||||
TemplateColumn ClassSystem.Web.UI.WebControls Namespace Renders a column in a DataGrid that allows customizing the layout of controls in the column.
|
||||||||||||||||||||||||||||||||||||||
| Visibility | Name | Value Type | Accessibility |
|---|---|---|---|
| public | EditItemTemplate | ITemplate | [ Get , Set ] |
| public | FooterTemplate | ITemplate | [ Get , Set ] |
| public | HeaderTemplate | ITemplate | [ Get , Set ] |
| public | ItemTemplate | ITemplate | [ Get , Set ] |
| Visibility | Name | Parameters | Return Type |
|---|---|---|---|
| public | InitializeCell | ( TableCell cell , Int32 columnIndex , ListItemType itemType ) | Void |
Use the TemplateColumn type in a DataGrid control to create a column with a customized control layout.
You can provide a custom appearance for the heading section, the footer section, and items section of the column by using the HeaderTemplate, FooterTemplate, and ItemTemplate properties, respectively.
You can also control how an item being edited is displayed in the TemplateColumn by setting the EditItemTemplate property.
The following example demonstrates using a TemplateColumn in a DataGrid to display images bound to a field in the data source.
DataGrid BoundColumn ButtonColumn EditCommandColumn HyperLinkColumn
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