Muokkaa

Jaa


ListView.InstantiateItemTemplate(Control, Int32) Method

Definition

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

protected:
 virtual void InstantiateItemTemplate(System::Web::UI::Control ^ container, int displayIndex);
protected virtual void InstantiateItemTemplate (System.Web.UI.Control container, int displayIndex);
abstract member InstantiateItemTemplate : System.Web.UI.Control * int -> unit
override this.InstantiateItemTemplate : System.Web.UI.Control * int -> unit
Protected Overridable Sub InstantiateItemTemplate (container As Control, displayIndex As Integer)

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

See also