Back to Devexpress

IComboBoxSettings.TextFieldName Property

blazor-devexpress-dot-blazor-dot-icomboboxsettings-174c1821.md

latest2.3 KB
Original Source

IComboBoxSettings.TextFieldName Property

Specifies the data source field that contains text for combo box items.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue("")]
[Parameter]
string TextFieldName { get; set; }

Property Value

TypeDefaultDescription
StringString.Empty

A field name.

|

Remarks

Use the TextFieldName property to change the field that contains text for combo box items at runtime. To specify the field name in markup, use the DxComboBoxSettings.TextFieldName 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:

csharp
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
    if(e.EditSettings is IComboBoxSettings comboBoxSettings)
        comboBoxSettings.TextFieldName = "CategoryName";
}
csharp
void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) {
    if(e.EditSettings is IComboBoxSettings comboBoxSettings)
        comboBoxSettings.TextFieldName = "CategoryName";
}

See Also

IComboBoxSettings Interface

IComboBoxSettings Members

DevExpress.Blazor Namespace