TemplateColumn Class

Represents a column type for the DataGrid control that allows you to customize the layout of controls in the column.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public ref class TemplateColumn : public DataGridColumn
public class TemplateColumn extends DataGridColumn
public class TemplateColumn extends DataGridColumn

Use the TemplateColumn column 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 the 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 object by setting the EditItemTemplate property.

The following code example demonstrates how to use the TemplateColumn class to create a column in the DataGrid control with a custom layout.

No code example is currently available or this language may not be supported.

  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
  • AspNetHostingPermission  for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.

System.Object
   System.Web.UI.WebControls.DataGridColumn
    System.Web.UI.WebControls.TemplateColumn

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: