.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

CompositeView.InsertItem(Int32, ViewItem) Method

Inserts a new View Item to a specified position within the CompositeView.Items collection.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public void InsertItem(
    int index,
    ViewItem item
)
Public Sub InsertItem(
    index As Integer,
    item As ViewItem
)
public void InsertItem(
    int index,
    ViewItem item
)
Public Sub InsertItem(
    index As Integer,
    item As ViewItem
)
public void InsertItem(
    int index,
    ViewItem item
)
Public Sub InsertItem(
    index As Integer,
    item As ViewItem
)

Parameters

Name Type Description
index Int32

A zero-based integer specifying the new View Item's position within the CompositeView.Items collection.

item ViewItem

A ViewItem descendant representing the View Item inserted into the current Detail View's CompositeView.Items collection.

Parameters

Name Type Description
index Int32

A zero-based integer specifying the new View Item's position within the CompositeView.Items collection.

item ViewItem

A ViewItem descendant representing the View Item inserted into the current Detail View's CompositeView.Items collection.

Parameters

Name Type Description
index Int32

A zero-based integer specifying the new View Item's position within the CompositeView.Items collection.

item ViewItem

A ViewItem descendant representing the View Item inserted into the current Detail View's CompositeView.Items collection.

Remarks

The InsertItem method inserts a View Item to the current Composite View's CompositeView.Items collection at the specified position. All the following items are moved to the end of the collection. The item parameter specifies the View Item to be inserted. The index parameter specifies the position. If index is the last in the collection, the View Item is appended to the end.

Inserting 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.

See Also