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

[Solved] How Can I use an Editor Template inside the form

0 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Deise
Top achievements
Rank 1
Deise asked on 13 Sep 2012, 12:22 PM
Hello;
I'm trying to use an Editor Template inside the form but it doesn't work. 
I've this Editor Tamplate:
@model dynamic
@(
 Html.Telerik().DropDownList()
        .Name("Color")
        .HtmlAttributes(new
        {
            id = "Color",
            Name = "Color",
            Style = "margin:4px;width:200px"
        })
        .DataBinding(dataBinding => dataBinding.Ajax().Select("GetColors", "Util"))
)
Now, I'm trying to use this in my form.
One friend suggested me to use a Partial class to invoke the Editor Template, but this is not working.
I did it:
@Html.Partial("~/Views/Shared/EditorTemplates/DropDownListCor.cshtml")
The DropDownList is shown but its items are not show, it doesn't work.
Someone has any suggestions to use an editor template in a form?
Tags
General Discussions
Asked by
Deise
Top achievements
Rank 1
Share this question
or