ListView.InstantiateItemTemplate(Control, Int32) Method

Definition

Populates the specified Control object by using child controls from one of the ListView control templates.

C#
protected virtual void InstantiateItemTemplate(System.Web.UI.Control container, int displayIndex);

Parameters

container
Control

The container that is used to store the child controls.

displayIndex
Int32

The display index of the item that is being instantiated.

Exceptions

The ListView control does not have an ItemTemplate template specified.

Remarks

This method uses a different template depending on the mode of the item being instantiated and the settings of the ListView control. The InstantiateItemTemplate method uses one of the following templates to populate the container:

Applies to

Produkt Verzie
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also