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.v18.2.dll

Declaration

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

Parameters

Type Name Description
Int32 index

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

ViewItem item

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