ListView.InstantiateItemTemplate(Control, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
-
Note
This method is primarily used by control developers to extend the ListView control.