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

[Solved] Populate DropDownList in RadGrid with custom values.

2 Answers 225 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 28 Mar 2008, 05:05 AM
I think this should be very simple, but even with all of the examples out there, I cannot figure this out.  I think lack of sleep is getting to me..

I have a RadGrid with some GripDropDownColumns.  I am using in-line editing.  I wish to populate the drop down lists in the columns with certain strings so I can limit user input to a static set of inputs.  I cannot just bind this to the database column, since all of the optional inputs may not be in there yet.

How do I achieve this?  I have seen an example using a edit template, but I'm not using a template.. simply in-line editing.

Thanks,
Stephen

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 28 Mar 2008, 08:24 AM
Hi Stephen,

You can use GridTemplateColumn with in-place editing. Just put the dropdownlist control in EditItemTemplate of the template column. You can find this implemented in this online example. Use the radio-button to switch to in-place editing and check the UnitPrice column. You can use the dropdownlist instead of the textbox in EditItemTemplate.

Hope this helps.

Kind regards,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Stephen
Top achievements
Rank 1
answered on 29 Mar 2008, 06:02 AM
Thank you Vlad.

I now understand the template columns much better than I did when I posted that message.
Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Ves
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or