Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfMultiSelect<TValue, TItem> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfMultiSelect<TValue, TItem>

    The MultiSelect component contains a list of predefined values from which a single value can be chosen.

    Inheritance
    System.Object
    Syncfusion.Blazor.SfBaseComponent
    SfDataBoundComponent
    SfDropDownBase<TItem>
    SfMultiSelect<TValue, TItem>
    Implements
    IDropDowns
    Inherited Members
    SfDropDownBase<TItem>.Render(IEnumerable<TItem>, FieldSettingsModel, Query)
    SfDropDownBase<TItem>.SetListData(IEnumerable<TItem>, FieldSettingsModel, Query)
    SfDropDownBase<TItem>.SetFields()
    SfDropDownBase<TItem>.SimpleDataExecute(IEnumerable<TItem>, Query)
    SfDropDownBase<TItem>.CloneQuery(Query)
    SfDropDownBase<TItem>.GetDataByText(String)
    SfDropDownBase<TItem>.IncrementalSearch(String, IEnumerable<TItem>, Nullable<Int32>, Boolean)
    SfDropDownBase<TItem>.Search(String, IEnumerable<TItem>, String, Boolean)
    SfDropDownBase<TItem>.SetItemValue(String)
    SfDropDownBase<TItem>.IsSimpleDataType()
    SfDropDownBase<TItem>.AddItem(IEnumerable<TItem>, Nullable<Int32>)
    SfDropDownBase<TItem>.InsertItem(IEnumerable<TItem>, Nullable<Int32>, Boolean)
    SfDropDownBase<TItem>.RenderItems()
    SfDropDownBase<TItem>.HighlightSearch(String, String, Boolean, FilterType)
    SfDropDownBase<TItem>.ListItemCreated(ListOptions<TItem>)
    SfDropDownBase<TItem>.EnablePersistence
    SfDropDownBase<TItem>.ItemTemplate
    SfDropDownBase<TItem>.GroupTemplate
    SfDropDownBase<TItem>.NoRecordsTemplate
    SfDropDownBase<TItem>.ActionFailureTemplate
    SfDropDownBase<TItem>.SortOrder
    SfDropDownBase<TItem>.Enabled
    SfDropDownBase<TItem>.DataSource
    SfDropDownBase<TItem>.Query
    SfDropDownBase<TItem>.FilterType
    SfDropDownBase<TItem>.IgnoreCase
    SfDropDownBase<TItem>.IgnoreAccent
    SfDropDownBase<TItem>.ZIndex
    SfDropDownBase<TItem>.Locale
    SfDropDownBase<TItem>.DropDownsEditContext
    SfDropDownBase<TItem>.ListData
    SfDropDownBase<TItem>.MainData
    SfDropDownBase<TItem>.ListDataSource
    SfDropDownBase<TItem>.ItemData
    SfDropDownBase<TItem>.IsActionFaiure
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfMultiSelect<TValue, TItem> : SfDropDownBase<TItem>, IDropDowns
    Type Parameters
    Name Description
    TValue
    TItem

    Constructors

    SfMultiSelect()

    Declaration
    public SfMultiSelect()

    Properties

    AllowCustomValue

    Allows user to add a Custom value the value which is not present in the suggestion list.

    Declaration
    public bool AllowCustomValue { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowFiltering

    To enable the filtering option in this component.

    Filter action performs when type in search box and collect the matched item through `Filtering` event.

    If searching character does not match, `NoRecordsTemplate` property value will be shown.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    ChangeOnBlur

    By default, the MultiSelect component fires the Change event while focus out the component.

    If you want to fires the Change event on every value selection and remove, then disable the ChangeOnBlur property.

    Declaration
    public bool ChangeOnBlur { get; set; }
    Property Value
    Type Description
    System.Boolean

    ComponentName

    Declaration
    protected override string ComponentName { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ComponentName

    CssClass

    Specifies the CSS class name that can be appended with the root element of the MultiSelect. One or more custom CSS classes can be added to a MultiSelect.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    DelimiterChar

    Sets the delimiter character for 'default' and 'delimiter' visibility modes.

    Declaration
    public string DelimiterChar { get; set; }
    Property Value
    Type Description
    System.String

    EnableChangeOnBlur

    By default, the MultiSelect component fires the Change event while focus out the component.

    If you want to fires the Change event on every value selection and remove, then disable the ChangeOnBlur property.

    Declaration
    public bool EnableChangeOnBlur { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableCloseOnSelect

    Based on the property, when item get select popup visibility state will changed.

    Declaration
    public bool EnableCloseOnSelect { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableGroupCheckBox

    Specifies a boolean value that indicates the whether the grouped list items are allowed to check by checking the group header in checkbox mode.

    By default, there is no checkbox provided for group headers.

    This property allows you to render checkbox for group headers and to select all the grouped items at once.

    Declaration
    public bool EnableGroupCheckBox { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableSelectionOrder

    Reorder the selected items in popup visibility state.

    Declaration
    public bool EnableSelectionOrder { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableVirtualization

    The Virtual Scrolling feature is used to display a large amount of data that you require without buffering the entire load of a huge database records in the DropDowns, that is, when scrolling, the datamanager request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDowns, set the EnableVirtualization to true.

    Declaration
    public bool EnableVirtualization { get; set; }
    Property Value
    Type Description
    System.Boolean

    FilterBarPlaceholder

    Accepts the value to be displayed as a watermark text on the filter bar.

    Declaration
    public string FilterBarPlaceholder { get; set; }
    Property Value
    Type Description
    System.String

    FloatLabelType

    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    FooterTemplate

    Accepts the template design and assigns it to the footer container of the popup list.

    Declaration
    public RenderFragment FooterTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    HeaderTemplate

    Accepts the template design and assigns it to the header container of the popup list.

    Declaration
    public RenderFragment HeaderTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    HtmlAttributes

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    ID

    Specifies the id of the MultiSelect component.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    InputAttributes

    You can add the additional input attributes such as disabled, value, and more to the root element.

    If you configured both the property and equivalent input attribute, then the component considers the property value.

    Declaration
    public Dictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    ItemsCount

    The data can be fetched in popup based on ItemsCount, when enabled the EnableVirtualization.

    Declaration
    public int ItemsCount { get; set; }
    Property Value
    Type Description
    System.Int32

    MaximumSelectionLength

    Sets limitation to the value selection.

    Based on the limitation, list selection will be prevented.

    Declaration
    public int MaximumSelectionLength { get; set; }
    Property Value
    Type Description
    System.Int32

    Mode

    configures visibility mode for component interaction.

    Declaration
    public VisualMode Mode { get; set; }
    Property Value
    Type Description
    VisualMode

    MultiSelectParent

    Declaration
    protected dynamic MultiSelectParent { get; set; }
    Property Value
    Type Description
    System.Object

    OpenOnClick

    Whether to automatically open the popup when the control is clicked.

    Declaration
    public bool OpenOnClick { get; set; }
    Property Value
    Type Description
    System.Boolean

    Placeholder

    Specifies the text that is shown as a hint or placeholder until the user focuses or enter a value in MultiSelect. The property is depending on the FloatLabelType property.

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    PopupHeight

    Gets or sets the height of the popup list. By default, it renders based on its list item.

    Declaration
    public string PopupHeight { get; set; }
    Property Value
    Type Description
    System.String

    PopupWidth

    Gets or sets the width of the popup list and percentage values has calculated based on input width.

    Declaration
    public string PopupWidth { get; set; }
    Property Value
    Type Description
    System.String

    Readonly

    Specifies the boolean value whether the MultiSelect allows the user to change the value.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    SelectAllText

    Specifies the selectAllText to be displayed on the component.

    Declaration
    public string SelectAllText { get; set; }
    Property Value
    Type Description
    System.String

    ShowClearButton

    Enables close icon with the each selected item.

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowDropDownIcon

    Allows you to either show or hide the DropDown button on the component

    Declaration
    public bool ShowDropDownIcon { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowSelectAll

    Declaration
    public bool ShowSelectAll { get; set; }
    Property Value
    Type Description
    System.Boolean

    TabIndex

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Text

    Selects the list item which maps the data Text field in the component.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    UnSelectAllText

    Specifies the UnSelectAllText to be displayed on the component.

    Declaration
    public string UnSelectAllText { get; set; }
    Property Value
    Type Description
    System.String

    Value

    Selects the list item which maps the data Value field in the component.

    Declaration
    public TValue Value { get; set; }
    Property Value
    Type Description
    TValue

    ValueChanged

    Declaration
    public EventCallback<TValue> ValueChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<TValue>

    ValueExpression

    Specifies the expression for defining the value of the bound.

    Declaration
    public Expression<Func<TValue>> ValueExpression { get; set; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression<System.Func<TValue>>

    ValueTemplate

    Accepts the template design and assigns it to the selected list item in the input element of the component.

    Declaration
    public RenderFragment<TItem> ValueTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<TItem>

    Width

    Gets or sets the width of the component. By default, it sizes based on its parent. container dimension.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    ActionBegin(IEnumerable<TItem>, Query)

    Declaration
    protected override Task<ActionBeginEventArgs> ActionBegin(IEnumerable<TItem> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task<ActionBeginEventArgs>
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionBegin(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.Data.Query)

    ActionComplete(IEnumerable<TItem>, Query)

    Declaration
    protected override Task ActionComplete(IEnumerable<TItem> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionComplete(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.Data.Query)

    ActionFailure(Object)

    Declaration
    protected override Task ActionFailure(object args)
    Parameters
    Type Name Description
    System.Object args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionFailure(System.Object)

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Clear()

    Allows you to clear the selected values from the MultiSelect component.

    Declaration
    public Task Clear()
    Returns
    Type Description
    System.Threading.Tasks.Task

    DependencyScripts()

    Declaration
    protected void DependencyScripts()

    Filter(IEnumerable<TItem>, Query, FieldSettingsModel)

    To filter the data from given data source by using query

    Declaration
    public Task Filter(IEnumerable<TItem> dataSource, Query query = null, FieldSettingsModel fields = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource
    Query query
    FieldSettingsModel fields
    Returns
    Type Description
    System.Threading.Tasks.Task

    FilterClear()

    Declaration
    protected Task FilterClear()
    Returns
    Type Description
    System.Threading.Tasks.Task

    FilteringAction(IEnumerable<TItem>, Query, FieldSettingsModel)

    Declaration
    protected Task FilteringAction(IEnumerable<TItem> dataSource, Query query, FieldSettingsModel fields)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource
    Query query
    FieldSettingsModel fields
    Returns
    Type Description
    System.Threading.Tasks.Task

    FocusIn()

    Sets the focus to the MultiSelect component for interaction.

    Declaration
    public Task FocusIn()
    Returns
    Type Description
    System.Threading.Tasks.Task

    FocusOut()

    Remove the focus from the MultiSelect component, if the component is in focus state.

    Declaration
    public Task FocusOut()
    Returns
    Type Description
    System.Threading.Tasks.Task

    GetDataByValue(TValue)

    Gets the array of data Object that matches the given array of values.

    Declaration
    public Task<List<TItem>> GetDataByValue(TValue dataValue)
    Parameters
    Type Name Description
    TValue dataValue

    Specifies the value(s).

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<TItem>>

    GetItemData(TItem)

    Declaration
    protected SelectedData<TItem> GetItemData(TItem item = null)
    Parameters
    Type Name Description
    TItem item
    Returns
    Type Description
    SelectedData<TItem>

    GetItems()

    Gets all the list items bound on this component.

    Declaration
    public IEnumerable<TItem> GetItems()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TItem>

    GetQuery(Query)

    Declaration
    protected override Query GetQuery(Query query)
    Parameters
    Type Name Description
    Query query
    Returns
    Type Description
    Query
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.GetQuery(Syncfusion.Blazor.Data.Query)

    IncrementSearch(KeyboardEventArgs)

    Declaration
    protected Task IncrementSearch(KeyboardEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task

    IsFilter()

    Declaration
    protected override bool IsFilter()
    Returns
    Type Description
    System.Boolean
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.IsFilter()

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.OnParametersSetAsync()

    PasteHandler()

    Declaration
    protected Task PasteHandler()
    Returns
    Type Description
    System.Threading.Tasks.Task

    RefreshPopup()

    Declaration
    protected Task RefreshPopup()
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectAll(Boolean)

    Based on the state parameter, entire list item will be selected/deselected.

    parameter

    • TrueSelects entire list items.
    • FalseUn Selects entire list items.
    Declaration
    public Task SelectAll(bool state)
    Parameters
    Type Name Description
    System.Boolean state
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetCssClass()

    Declaration
    protected void SetCssClass()

    SetRTL()

    Declaration
    protected void SetRTL()

    ShowPopup()

    Opens the popup that displays the list of items.

    Declaration
    public Task ShowPopup()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowSpinner()

    Shows the spinner loader.

    Declaration
    public Task ShowSpinner()
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateListSelection(ListOptions<TItem>, String, Boolean)

    Declaration
    protected Task UpdateListSelection(ListOptions<TItem> listItem, string className, bool isAdd)
    Parameters
    Type Name Description
    ListOptions<TItem> listItem
    System.String className
    System.Boolean isAdd
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdatePopupState()

    Declaration
    protected void UpdatePopupState()

    UpdateSelectedItem(ListOptions<TItem>, EventArgs, KeyboardEventArgs, Boolean)

    Declaration
    protected Task UpdateSelectedItem(ListOptions<TItem> item, EventArgs args = null, KeyboardEventArgs keyArgs = null, bool isGroupBy = false)
    Parameters
    Type Name Description
    ListOptions<TItem> item
    System.EventArgs args
    Microsoft.AspNetCore.Components.Web.KeyboardEventArgs keyArgs
    System.Boolean isGroupBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateValue()

    Declaration
    protected Task UpdateValue()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Implements

    IDropDowns
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved