ASPxClientComboBox.InsertItem(index, text) Method

Adds a new item to the control's items collection at the specified index.


    index: number,
    text: string | string[],
    value?: any,
    imageUrl?: string
): void


Name Type Description
index number

An integer value that represents the index position.

text string | string[]
value any

An object that represents the item's associated value.

imageUrl string

A String value specifying the path to the image displayed by the item.


The control's client-side functionality enables you to programmatically access and manipulate its particular item on the client side. Use the InsertItem method to add a new item at the specified index within the collection, or the AddItem method, to add a new item to the end of the collection. To obtain an item with the specified index, use the ASPxClientComboBox.GetItem method. An item can be removed from the collection by using the ASPxClientComboBox.RemoveItem method.

Note that values of columns which are hidden by using their WebColumnBase.Visible property are not persisted on the client side. So, the InsertItem method can't be used to set a hidden column's value - all item values defined by this method should correspond to visible columns in the order of their appearance.

Usage (JavaScript):

ASPxComboBox1.InsertItem(0, ['Value for the first visible column', 'Value for the second visible column'], 123, 'Images/image.jpg');

See Also