ForeignKey dropdown column in PopUp editor

2 posts, 1 answers
  1. Mark
    Mark avatar
    4 posts
    Member since:
    Oct 2016

    Posted 30 Jun Link to this post

    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

        Season ID
        @(Html.Kendo().DropDownListFor(model => model.Season)
            .Events(e => e.Change("onChange"))
            .BindTo((System.Collections.IEnumerable) ViewData["seasons"])
        @Html.ValidationMessageFor(model => model.Season_ID)


    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"}......



  2. Answer
    Alex Hajigeorgieva
    Alex Hajigeorgieva avatar
    317 posts

    Posted 04 Jul Link to this post

    Hello Mark,

    I have updated one of our Foreign Key demos so you can compare it to your implementation. Please find it attached here. The foreign key should be decorated with the UIHint attribute as shown in this forum thread:'t-show-the-correct-item-selected#vSWvUKomIk2BKR1vr6kcNw 

    Please compare it with your implementation and let me know how you get on.

    Kind Regards,
    Alex Hajigeorgieva
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualisation (charts) and form elements.
Back to Top