We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to fetch data from Code behind for dropdown edit field?

In some cases (Editing/Adding) we can bind external data to dropdown edit field columns in Grid by means of code behind.

 

Solution:

 

Using the DataSource property of Grid Column, we can bind external data in the dropdown column of Grid. DataSource for the dropdown column must be given in form of text and value pair or else fields must be enabled to DropDownList.

 

Refer our below link for our API reference

 

https://help.syncfusion.com/cr/cref_files/aspnet/Syncfusion.EJ.Web~Syncfusion.JavaScript.Web.DropDownList~DropDownListFields.html

 

https://help.syncfusion.com/cr/cref_files/aspnet/Syncfusion.EJ.Web~Syncfusion.JavaScript.Web.DropDownList~Text.html

https://help.syncfusion.com/cr/cref_files/aspnet/Syncfusion.EJ.Web~Syncfusion.JavaScript.Web.DropDownList~Value.html  

 

Aspx

 

 

C#

 

 

The result will be as follows.

 

Figure 1: Fetch data from Code behind for dropdown edit field

Article ID: Published Date: Last Revised Date: Platform: Control:
9262 09/11/2018 09/11/2018 ASP.NET Web Forms Grid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.