Blazor MultiSelect Dropdown Example - Data Binding

MultiSelect Dropdown / Data Binding

This example demonstrates the MultiSelect's data binding support. Select an item from the suggestion list by clicking the MultiSelect component. When you first click on the remote data MultiSelect, the loader icon will appear until the remote request retrieves the data from the server and displays it.

Loading Syncfusion Blazor Server Demos…

The MultiSelect loads the data either from local data sources or remote data services through the DataSource property. It supports the data type of Array, Observable Collection, ExpandoObject, DynamicObject and DataManager.

The DataManager, that acts as an interface between the service endpoint and MultiSelect will require the following minimal information to interact with the service endpoint properly.

  • DataManager.Url - Defines the service endpoint to fetch data.
  • DataManager.Adaptor - Defines the adaptor option. By default, ODataAdaptor is used for remote binding. The adaptor is responsible for processing responses and requests from/to the service endpoint. Syncfusion.Blazor.Data package provides some predefined adaptors that are designed to interact with particular service endpoints. They are:

    • UrlAdaptor - Use this to interact with any remote services.
    • ODataAdaptor - Use this to interact with OData endpoints.
    • ODataV4Adaptor - Use this to interact with OData V4 endpoints.
    • WebApiAdaptor - Use this to interact with Web API created under OData standards.
    • WebMethodAdaptor - Use this to interact with web methods.

Below are the different types of data binding used in this sample.

  • Local Data MultiSelect is bound to a collection of sports data.
  • Remote Data MultiSelect is bound to a collection of customer data using DataManager.
  • Observable Collection MultiSelect is bound to a ObservableCollection of colors data.
  • ExpandObject MultiSelect is bound to the collection of vehicles data of type ExpandObject.
  • DynamicObject MultiSelect is bound to the collection of customers data of type DynamicObject.

See also

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE