blazor-devexpress-dot-blazor-dot-dxribboncomboboxitem-2-7ecc43e8.md
Specifies whether the component can search for text that users type in the edit box.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public ListSearchMode SearchMode { get; set; }
| Type | Default | Description |
|---|---|---|
| ListSearchMode | null |
An enumeration value.
|
Available values:
| Name | Description |
|---|---|
| Default |
AutoSearch is used. The component automatically searches for text that users type in the edit box.
| | None |
The filter is not applied to list items.
| | AutoSearch |
The component searches for text that users type in the edit box.
|
Use the SearchMode property to change how the combo box editor searches for text.
The following snippet disables search in the combo box editor:
<DxRibbon>
<DxRibbonTab Text="Home">
<DxRibbonGroup>
<DxRibbonComboBoxItem Data="FontSizes"
@bind-Value="CurrentFontSize"
TextFieldName="@nameof(FontSizeInfo.Size)"
AllowUserInput="true"
NullText="Font Size"
SearchMode="@ListSearchMode.None" />
</DxRibbonGroup>
</DxRibbonTab>
</DxRibbon>
@code {
private FontSizeInfo CurrentFontSize { get; set; }
private IEnumerable<FontSizeInfo> FontSizes => FontSizeInfo.DefaultFontSizes;
}
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)
};
}
DevExpress.Blazor.Ribbon.IRibbonComboBox<TData, TValue>.SearchMode
See Also
DxRibbonComboBoxItem<TData, TValue> Class