Back to Devexpress

MVCxClientComboBox Class

aspnetmvc-js-mvcxclientcombobox.md

latest2.0 KB
Original Source

MVCxClientComboBox Class

A client-side counterpart of the ComboBox and ComboBoxFor extensions.

Declaration

ts
declare class MVCxClientComboBox extends ASPxClientComboBox

Remarks

The following example illustrates how to use the MVCxClientComboBox class.

Note

For a full example, refer to MVC ComboBox Extension - Cascading Combo Boxes.

cshtml
@Html.DevExpress().ComboBox(settings => {
    settings.Name = "City";
    settings.Properties.TextField = "Name";
    settings.Properties.ValueField = "ID";
    ...
    settings.Properties.ClientSideEvents.BeginCallback = "function(s, e) { e.customArgs['Country'] = Country.GetValue(); }";
}).BindList(CS.Models.City.GetCities(Model.Country)).Bind(Model.City).GetHtml()
...
@Html.DevExpress().ComboBox(settings => {
    settings.Name = "Country";
    settings.Properties.TextField = "Name";
    settings.Properties.ValueField = "ID";
    ...
    settings.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e) { City.PerformCallback(); }";
}).BindList(CS.Models.Country.GetCountries()).Bind(Model.Country).GetHtml()

Inheritance

ASPxClientControlBase ASPxClientControl ASPxClientEditBase ASPxClientEdit ASPxClientTextEdit ASPxClientTextBoxBase ASPxClientButtonEditBase ASPxClientDropDownEditBase ASPxClientComboBox MVCxClientComboBox

See Also

MVCxClientComboBox Members