• Material 3
  • Fluent
  • Bootstrap v5
  • Tailwind CSS
  • High Contrast
Preferences
Theme Selection
Theme Modes
Mode Selection
Touch
Mouse
Localization
*Translated by Google Translator.
Currency

Example of Data Binding in ASP.NET MVC Dropdown List Control

This sample demonstrates the different data binding supports of the DropDownList. Click the DropDownList element and select an item from the suggestion list. At the very first time, when you click on the remote data DropDownList, the loader icon will be shown until the remote request get the data from the server and display it.

DEMO
SOURCE

Local Data

Remote Data

The DropDownList loads the data either from the local data sources, or remote data services that is through the dataSource property. It supports the data type of array or DataManager.

The DataManager that act as an interface between service endpoint and DropDownList, will require the below 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.

Adaptor is responsible for processing response and request from/to the service endpoint. syncfusion/ej2-data package provides some predefined adaptors that are designed to interact with the 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.

In this sample, the local data is bound to a collection of sports data, and the remote data is bound to a collection of customer data as an instance of DataManager.

More information on the data binding feature configuration can be found in the documentation section.

Transform your ASP.NET MVC web apps today with Syncfusion ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE