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. Image for the cookie policy date
close icon

How to implement drop down box into grid ?

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.

3 Replies

YO Yogeshwaran Syncfusion Team 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,



JA Jawed June 15, 2012 07:13 AM UTC

Thanks a lot.


YO Yogeshwaran Syncfusion Team 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


Loader.
Live Chat Icon For mobile
Up arrow icon