Skip to main content

ASPxClientComboBox Class

The client-side equivalent of the ASPxComboBox control.

Declaration

declare class ASPxClientComboBox extends ASPxClientDropDownEditBase

Remarks

The client-side programmatic interface is available if the editor’s EnableClientSideAPI property is set to true or any client event is handled.

Run Demo: Cascading Combo Boxes

<dx:ASPxComboBox runat="server" ID="CmbCountry" DropDownStyle="DropDownList" IncrementalFilteringMode="StartsWith"
    TextField="CountryName" ValueField="CountryName" Width="100%" DataSourceID="CountriesDataSource"
    EnableSynchronization="False">
    <ClientSideEvents SelectedIndexChanged="function(s, e) { OnCountryChanged(s); }" />
</dx:ASPxComboBox>
var lastCountry = null;
function OnCountryChanged(cmbCountry) {
    if (cmbCity.InCallback())
        lastCountry = cmbCountry.GetValue().toString();
    else
        cmbCity.PerformCallback(cmbCountry.GetValue().toString());
    }
function OnEndCallback(s, e) {
    if (lastCountry) {
        cmbCity.PerformCallback(lastCountry);
        lastCountry = null;
    }
}

Online Demo

ASPxComboBox - Cascading Combo Boxes

See Also