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

[Solved] DropDownList not showing in the Edit Mode

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dharam Narayan
Top achievements
Rank 1
Dharam Narayan asked on 21 Apr 2010, 03:40 PM

Hi,

I have made an MVC appliction and used the telerik to show Grid .My one of the columns need to be the DropDownlist.

For this I have added the code   

columns.Add(c => c.Source )

.Template(o =>

{

%>

<%

=Html.DropDownList("Source", new SelectList(new string[] { "1","2","3","4" }))%>

 

<%

})

In the Grid it shows the Dropdownlist .But in the Edit mode the Dropdownlist changes to TextBox with no values in it
My code and structure are similiar to 
http://demos.telerik.com/aspnet-mvc/Grid/EditingServerSide/ALFKI?Grid-mode=edit  


Thanks in Adance
Dnm
  

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 21 Apr 2010, 04:12 PM
Hello Dharam Narayan,

Indeed the Template is used only for readonly mode. To customize editing you should implement an edit template. I recommend you check the display and edit templates help topic. Also check the display and edit templates online demo.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Dharam Narayan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or