Use the TemplateColumn class to create a column with a customized control layout.
<asp:DataGrid id="accessID" runat="server"
AutoGenerateColumns=false
...
<Columns>
<asp:TemplateColumn>
<templateType>
... templateType content here ...
</templateType>
</asp:TemplateColumn>
....
</Columns>
</asp:DataGrid>
where templateType can be any combination of the following.
| Property |
Description |
| EditItemTemplate |
The HTML elements and controls that define the column when it is in edit mode. |
| FooterTemplate |
The HTML elements and controls that define the column footer. |
| HeaderTemplate |
The HTML elements and controls that define the column header. |
| ItemTemplate |
The HTML elements and controls that define the column when it is displayed. |
For an example of using a TemplateColumn control, see Adding Template Columns to a DataGrid Web Server Control.
For additonal information, see the TemplateColumn Class documentation.