Skip to main content

AutoCompleteBoxPropertiesBase.ValueField Property

Specifies the data source field that contains values for the editor’s items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public string ValueField { get; set; }

Property Value

Type Default Description
String String.Empty

The data source field name.


A data bound editor populates its Items collection by retrieving items from the specified data source and obtaining item characteristics (such as the item text, value or displayed image) from specific data fields. Use the ValueField property to specify a data source’s field from which the item values should be obtained.

If the ValueField property of a data bound combo box is not defined, the control can automatically obtain item values from a data field whose name is “Value”.


The values contained in the ValueField field must be unique.

The ValueField property synchronizes its value with the editor’s ASPxAutoCompleteBoxBase.ValueField property.

Web Forms Example

Run Demo: ASPxComboBox - Cascading Combo Boxes

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

MVC Example

View Example: MVC ComboBox Extension - Cascading Combo Boxes

@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(); }";
@Html.DevExpress().ComboBox(settings => {
    settings.Name = "Country";
    settings.Properties.TextField = "Name";
    settings.Properties.ValueField = "ID";
    settings.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e) { City.PerformCallback(); }";
See Also