blazor-devexpress-dot-blazor-dot-dxribboncomboboxitem-2-10720542.md
Specifies the text displayed in the edit box of the Ribbon’s combo box.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public string EditText { get; set; }
| Type | Default | Description |
|---|---|---|
| String | null |
The combo box text.
|
Set AllowUserInput to true to allow users type custom values into the Ribbon’s combo box. The EditText property specifies the text displayed in the box.
The combo box updates EditText and fires the EditTextChanged event when a user does one of the following:
Note
Typed values are not inserted into the bound data source or added to the drop-down list. If a user enters a value equal to an existing item, the combo box selects that item.
The following code snippet specifies the custom font size in the Ribbon’s combo box:
<DxRibbon>
<DxRibbonTab Text="Home">
<DxRibbonGroup Text="Style">
<DxRibbonItem Text="Bold" IconCssClass="dx-icon-bold" />
<DxRibbonItem Text="Italic" IconCssClass="dx-icon-italic" />
<DxRibbonItem Text="Underline" IconCssClass="dx-icon-underline" />
<DxRibbonComboBoxItem Data="FontSizes"
Value="@CurrentFontSize"
TextFieldName="@nameof(FontSizeInfo.Size)"
AllowUserInput="true"
EditText="15"
NullText="Font Size"
Width="120px" />
</DxRibbonGroup>
</DxRibbonTab>
</DxRibbon>
public class FontSizeInfo
{
public int Size { get; private set; }
public FontSizeInfo(int size)
{
Size = size;
}
public static readonly FontSizeInfo[] DefaultFontSizes = new FontSizeInfo[] {
new FontSizeInfo(8),
new FontSizeInfo(10),
new FontSizeInfo(12),
new FontSizeInfo(14),
new FontSizeInfo(18),
new FontSizeInfo(24),
new FontSizeInfo(28),
new FontSizeInfo(32)
};
}
DevExpress.Blazor.Ribbon.IRibbonComboBox<TData, TValue>.EditText
See Also
DxRibbonComboBoxItem<TData, TValue> Class