ListView::EmptyItemTemplate Property
Gets or sets the user-defined content for the empty item that is rendered in a ListView control when there are no more data items to display in the last row of the current data page.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
[PersistenceModeAttribute(PersistenceMode::InnerProperty)] [TemplateContainerAttribute(typeof(ListViewItem))] [BrowsableAttribute(false)] public: virtual property ITemplate^ EmptyItemTemplate { ITemplate^ get (); void set (ITemplate^ value); }
<asp:ListView> <EmptyItemTemplate>ITemplate</EmptyItemTemplate> </asp:ListView>
Property Value
Type: System.Web.UI::ITemplateAn object that contains the custom content for the empty item. The default is nullptr, which indicates that this property is not set.
The empty item is displayed in a ListView control when there are no more data items to display in the last group of the current page. This can occur only if GroupItemCount is set to a value greater than 1. For example, in a ListView control, the GroupItemCount property might be set to 5 and the total number of items returned from the data source is 8. In that case, the last row of data will contain three items defined by the ItemTemplate template and two items defined by the EmptyItemTemplate template.
You can define a custom user interface (UI) for the empty item by using the EmptyItemTemplate property. To specify a custom template declaratively for the empty item, add an EmptyItemTemplate element inside the ListView control. You can then add the contents of the template to the EmptyItemTemplate element.
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.