aspxtreme

DataGrid Control Syntax

ASP.NET Syntax   ASP.NET Syntax for Web Controls


TemplateColumn

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.

TemplateColumn Properties


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.


Books and more ...


Suggested Reading

Need a break ?


More ...
Back to top

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