This is a migrated thread and some comments may be shown as answers.

Add databound Dropdown to Grid in C#?

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Iron
Paul asked on 08 Jul 2016, 06:11 PM

Hi All...

So, I've built a Grid programmatically and databound it... so far so good.  I need to add a column containing dropdown list, which would be databound.  I need to be able to use it as an edit button so that when the selected value changed fires, it updates the particular field for that row.  I've found a number of threads similar but for the life of me, don't see this particular scenario addressed...

I'd be very grateful for any assistance!

Thank you!

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 13 Jul 2016, 07:00 AM
Hello Paul,

You can use a GridTemplateColumn to achieve that. Check the example provided in the following section for a reference:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/creating-a-radgrid-programmatically#creating-template-columns-programmatically

Please bear in mind that the grid should be created entirely during Page_Init and the column properties should be added before adding the column to the Columns collection, as explained in the article above.

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Iron
Answers by
Eyup
Telerik team
Share this question
or