TemplateColumn

TemplateColumn

System.Web.UI.WebControls (system.web.dll)class

This class represents a type of column that can be added to the DataGrid control. A TemplateColumn allows you to create fully customized output in the DataGrid by using templates. These templates are defined by using the .aspx (not the properties of this class), which is similar to the method used by the DataList and Repeater controls. Templates allow you to combine several different fields in a single column and add other HTML elements and ASP.NET controls.

In the TemplateColumn definition in the .aspx file, you can define up to four templates: HeaderTemplate, ItemTemplate, EditItemTemplate, and FooterTemplate. Inside these template definitions, you can insert data binding expressions or HTML and ASP.NET elements.

public class TemplateColumn : DataGridColumn { // Public Constructors    public TemplateColumn( ); // Public Instance Properties    public virtual ITemplate EditItemTemplate{set; get; }    public virtual ITemplate FooterTemplate{set; get; }    public virtual ITemplate HeaderTemplate{set; get; }    public virtual ITemplate ItemTemplate{set; get; } // Public Instance Methods    public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType);                // overrides DataGridColumn }

Hierarchy

System.Object DataGridColumn(System.Web.UI.IStateManager) TemplateColumn



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net