Skip to main content
Tab

ASPxAutoCompleteBoxBase.Items Property

Gets the collection of items displayed in the editor’s dropdown window.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public virtual ListEditItemCollection Items { get; }

Property Value

Type Description
ListEditItemCollection

A ListEditItemCollection instance that is the collection of items in the editor.

Remarks

This property is a wrapper of the AutoCompleteBoxPropertiesBase.Items property.

Note

For the ASPxTokenBox control only:

To work properly, an item’s ListEditItem.Text and ListEditItem.Value property values should be specified.

An item’s ListEditItem.Text property value cannot contain a comma (,), semicolon (;), or a sign specified by the ASPxTokenBox.TextSeparator property.

An item’s ListEditItem.Value property value cannot contain a comma (,), semicolon (;), or a sign specified by the ASPxTokenBox.ValueSeparator property.

Example

The example below demonstrates how to get values stored in a hidden column of the Combo Box control on the client:

<dx:ASPxComboBox ID="ASPxComboBox1" ClientInstanceName="cbox" ValueField="ProductID" DropDownStyle="DropDownList"
    OnCustomJSProperties="ASPxComboBox1_CustomJSProperties" DataSourceID="SqlDataSource1" runat="server" Width="300"> 
    <Columns>
        <dx:ListBoxColumn FieldName="ProductID" />
        <dx:ListBoxColumn FieldName="ProductName" />
        <dx:ListBoxColumn FieldName="CategoryID" />
        <dx:ListBoxColumn FieldName="UnitPrice" Visible="false" />
    </Columns>
</dx:ASPxComboBox>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="UnitPrice value" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) {
        var v = cbox.cpHiddenColumnValues[cbox.GetSelectedIndex()];
        alert(v);
        }" />
</dx:ASPxButton>
protected void ASPxComboBox1_CustomJSProperties(object sender, DevExpress.Web.CustomJSPropertiesEventArgs e)
{
    ArrayList list = new ArrayList();
    foreach (ListEditItem item in ASPxComboBox1.Items)
        list.Add(item.GetFieldValue("UnitPrice"));
    e.Properties["cpHiddenColumnValues"] = list;
}

View Example: Combo Box for ASP.NET Web Forms - How to get hidden column values on the client

See Also