Back to Devexpress

ASPxClientComboBox Class

aspnet-js-aspxclientcombobox.md

latest2.1 KB
Original Source

ASPxClientComboBox Class

The client-side equivalent of the ASPxComboBox control.

Declaration

ts
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

aspx
<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>
javascript
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

Inheritance

ASPxClientControlBase ASPxClientControl ASPxClientEditBase ASPxClientEdit ASPxClientTextEdit ASPxClientTextBoxBase ASPxClientButtonEditBase ASPxClientDropDownEditBase ASPxClientComboBox ASPxClientTokenBox

See Also

ASPxClientComboBox Members