CompositeView.InsertItem(Int32, IModelViewItem) Method
Creates a View Item using specified information on it, and inserts it to a Composite View’s CompositeView.Items collection at a specified position.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | A zero-based integer specifying the new View Item’s position within the CompositeView.Items collection. |
info | IModelViewItem | An IModelViewItem object representing the Application Model node with the information on the new View Item. |
Returns
Type | Description |
---|---|
ViewItem | A ViewItem descendant representing the View Item inserted. |
Remarks
The InsertItem method creates a View Item using information from the Application Model node. This node is passed as the info parameter. The created item is inserted into the current Composite View’s CompositeView.Items collection at the specified position by moving all subsequent items to the end of the collection. The index parameter specifies this position. If index is the last in the collection, the View Item is appended to the end.
Adding an item to the CompositeView.Items collection raises the CompositeView.ItemsChanged event.
Generally, you do not need to use this method. Instead, you can add View Items via the Application Model. For this purpose, use the Application | Views | DetailView | Items node.