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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: ASP.NET Web Forms |
Control: Grid |
Published Date: September 11, 2018 |
Last Revised Date: September 11, 2018
Tags: grid, datasource

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

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon