Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxRibbonComboBoxItem<TData, TValue>.TextFieldName Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public string TextFieldName { get; set; }

#Property Value

Type Description
String

The data source field’s name.

#Remarks

Use the TextFieldName property when you bind the ribbon combo box item to a data source that stores custom objects (IEnumerable<CustomType>). This property specifies the name of the data source field that stores text for the combo box items.

If the TextFieldName property is not specified, the item searches for the Text field in the data source and uses this field as the text field. Otherwise, the editor populates its items with CustomType.ToString() values.

...
<DxRibbonComboBoxItem Data="FontSizes"
                      @bind-Value="CurrentFontSize"
                      TextFieldName="@nameof(FontSizeInfo.Size)"
                      AllowUserInput="true"
                      NullText="Font Size"
                      Width="120px" />
...
@code {
    private FontSizeInfo CurrentFontSize { get; set; }
    private IEnumerable<FontSizeInfo> FontSizes => FontSizeInfo.DefaultFontSizes;
}

Ribbon combobox item

See Also