background preloader

Technologie Interface dynamique

Facebook Twitter

TemplateField Class (System.Web.UI.WebControls) You can define a custom template for the different parts of the TemplateField object using the templates listed in the following table.

TemplateField Class (System.Web.UI.WebControls)

You also can customize the appearance of the TemplateField object (font color, background color, and so on) by setting the style properties for the different parts of the field. The following table lists the different style properties. TemplateField.EditItemTemplate Property (System.Web.UI.WebControls) [TemplateContainerAttribute(typeof(IDataItemContainer), BindingDirection.TwoWay)] [BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode.InnerProperty)] public virtual ITemplate EditItemTemplate { get; set; } To specify a template, first place opening and closing <EditItemTemplate> tags between the opening and closing tags of the <TemplateField> element.

TemplateField.EditItemTemplate Property (System.Web.UI.WebControls)

Next, add the custom content between the opening and closing <EditItemTemplate> tags. The content can be as simple as plain text or more complex (embedding other controls in the template, for example). <%@ Page language="C#" %><! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " runat="server"> void AuthorsGridView_RowUpdating (Object sender, GridViewUpdateEventArgs e) { // The GridView control does not automatically extract updated values // from TemplateField column fields. TemplateField Constructor (System.Web.UI.WebControls) .NET Framework Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0 Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

TemplateField Constructor (System.Web.UI.WebControls)