I've set up a ForeignKey column with dropdown editor that works fine in GridEditMode.InLine but does not work at all in GridEditMode.PopUp
<
div
>
Season ID
</
div
>
<
div
>
@(Html.Kendo().DropDownListFor(model => model.Season)
.Name("SeasonId_#=Season_ID#")
.DataValueField("SId")
.DataTextField("Name")
.Value("#=SId#")
.Events(e => e.Change("onChange"))
.BindTo((System.Collections.IEnumerable) ViewData["seasons"])
.ToClientTemplate().ToHtmlString()
)
@Html.ValidationMessageFor(model => model.Season_ID)
</
div
>
It creates a functioning dropdown Inline, but in PopUp the input field does not render, but rather shows the HTML:
Season ID
<
input
id
=
"SeasonId_#=Season_ID#"
name
=
"SeasonId_#=Season_ID#"
type
=
"text"
value
=
"#=SId#"
/><
script
> kendo.syncReady(function(){jQuery("#SeasonId_#=Season_ID#").kendoDropDownList({"change":onChange,"dataSource":[{"SId":5,"Name":"1971-1972"},{"SId":6,"Name":"1972-1973"},{"SId":7,"Name":"1973-1974"},{"SId":8,"Name":"1974-1975"},{"SId":9,"Name":"1975-1976"},{"SId":10,"Name":"1976-1977"},{"SId":11,"Name":"1977-1978"},{"SId":12,"Name":"1978-1979"},{"SId":13,"Name":"1979-1980"},{"SId":14,"Name":"1980-1981"}......
Thanks.