ListView::GroupTemplate Property
Gets or sets the user-defined content for the group container in a ListView control.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
[BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode::InnerProperty)] [TemplateContainerAttribute(typeof(ListViewItem))] public: virtual property ITemplate^ GroupTemplate { ITemplate^ get (); void set (ITemplate^ value); }
<asp:ListView> <GroupTemplate>ITemplate</GroupTemplate> </asp:ListView>
Property Value
Type: System.Web.UI::ITemplateAn object that contains the custom content for the group container in a ListView control. The default is nullptr, which indicates that this property is not set.
Use the GroupTemplate property to create a tiled layout in the ListView control. In a tiled table layout, the items are repeated horizontally in a row. The numbers of times that an item is repeated is specified by the GroupItemCount property.
To specify a template declaratively for the group container, add a GroupTemplate element inside the ListView control. You can then add the contents of the template to the GroupTemplate element.
The GroupTemplate property must include a placeholder for the data item, such as a table cell (td), div, or span element. This placeholder must have the runat attribute set to "server" and the ID attribute set to the value of the ItemPlaceholderID property. At run time, the ListView control replaces the placeholder with the content that is defined for each item in the ItemTemplate and AlternatingItemTemplate templates.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.