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

Render RadDropdownlist from C# code behind

2 Answers 179 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Kalpesh
Top achievements
Rank 1
Kalpesh asked on 21 Nov 2013, 02:39 PM
Hello

Current Scenario: Currently we are generating html select (dropdown) from code behind using string builder and adding the generated HTML into literal control - which will display the HTML. Below is the code snippet.

html.Append("<select name=test id=test class='xyz' onchange=\"changeDD(this);\" >");
html.Append("<option value='1'>xyz</option>");

We have number of controls being rendered dynamically based on customer settings. Now, We are trying to replace this html select (dropdown) with Telerik RadDropdownlist.

Please suggest the approach or provide your inputs to achieve this kind of HTML rendering from code behind. Also we have JS written for some of the controls.

Please let me know if you need more details.

2 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 26 Nov 2013, 09:29 AM
Hello Kalpesh,

Thank you for contacting Telerik Support.

I had prepared a sample page for you, demonstrating how to create grammatically the RadDropDownList at code-behind and assign the client-side events. Please find it attached and let me know if any further assistance is needed.

Hope this would help. I will be glad to assist you any further.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Kalpesh
Top achievements
Rank 1
answered on 26 Nov 2013, 12:45 PM
Hello,

Thanks for the sample.
Tags
DropDownList
Asked by
Kalpesh
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Kalpesh
Top achievements
Rank 1
Share this question
or