blazor-devexpress-dot-blazor-dot-icomboboxsettings-52459e3b.md
Specifies the name of the data source field that contains combo box values.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue("")]
[Parameter]
string ValueFieldName { get; set; }
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A field name.
|
Use the ValueFieldName property to change the field that supplies values at runtime. To specify the field name in markup, use the DxComboBoxSettings.ValueFieldName property.
The IComboBoxSettings interface allows you to get and customize settings of a combo box editor at runtime. You can get editor settings in the following ways:
Call the GetColumnEditSettings method to get editor settings of the column bound to the specified data source field.
Handle the CustomizeFilterRowEditor event to customize a cell editor in the filter row.
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
if(e.EditSettings is IComboBoxSettings comboBoxSettings)
comboBoxSettings.ValueFieldName = "CategoryId";
}
void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) {
if(e.EditSettings is IComboBoxSettings comboBoxSettings)
comboBoxSettings.ValueFieldName = "CategoryId";
}
See Also