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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to implement drop down box into grid ?

Thread ID:

Created:

Updated:

Platform:

Replies:

103930 Jun 8,2012 12:24 PM UTC Jun 18,2012 06:13 AM UTC ASP.NET MVC (Classic) 3
loading
Tags: Grid
Jawed
Asked On June 8, 2012 12:24 PM UTC

Hi
I am displaying the enum data into the grid .after clicking  the edit button i want to display all enum data into the drop down box with in grid.
This happened easily with teleric control using editor tempalte and dispaly tempaltess
How to implement these kind of  feature into syncfusion grid.

Yogeshwaran [Syncfusion]
Replied On June 12, 2012 01:33 PM UTC

Hi Jawed,

Thanks for using Syncfusion products.

You requirement can be achieved by converting the Enum values into the IEnumerable list values and passed the string data’s into the grid. Please refer to the following code snippets:

public List<SelectListItem> InvestigationList
{
get
{
var data = Enum.GetValues(typeof(InvestigationActionType)).Cast<InvestigationActionType>().Select(v => new SelectListItem
{
Text = v.ToString(),

// if you would like to display the integer values in Grid , we can return value as Value = (int(v)).ToString()

Value = v.ToString()
}).ToList();
return data;
}
}

For your convince, we have created the sample and the same can be downloaded from below link.

Sample.zip

Please let us know if you have any concerns.

Regards,


Jawed
Replied On June 15, 2012 07:13 AM UTC

Thanks a lot.

Yogeshwaran [Syncfusion]
Replied On June 18, 2012 06:13 AM UTC

Hi Jawed,

 

Thanks for your update .

 

Please let us know if you have any other queries.

 

Regards,

Yogesh R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;