Cascading DropDownList not working in popup Window

9 posts, 0 answers
  1. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 30 Dec 2016 Link to this post

    I am not sure if this is a KendoWindow problem or a KendoDropDownList problem, so I will post in both forums.
    My Problem:
    I have 2 DropDownLists; 'Code' and 'Rule'. 'Rule' cascades from 'Code'. These are both located in a modal KendoWindow.
    If I have my controller return a PartialView, the second DropDownList does not even appear as a DropDownList, but as a textbox (Image1.jpg).
    If I return a regular view, then both of the DropDownLists appear as they should (Image2.jpg), but then I get all of the stuff on the top of the popup that I do not want or need.

    Code for my first DropDownList:

    @(Html.Kendo().DropDownListFor(model => model.IncidentCategoryCode)                 //DropDownList for CODE
    .HtmlAttributes(new { id = "incidentCategoryCode", style = "width: 99%;", @class = "large-links" })
    .DataTextField("IncidentCategoryCode")
    .DataValueField("IncidentCategoryCode")
    .DataSource(source =>
    {
        source.Read(read =>
        {
            read.Action("GetIncidentCategories", "IncidentCategory");
        });
    })
    )

    Code for my second DropDownList:

    @(Html.Kendo().DropDownListFor(model => model.ViolationCategoryNumber)                 //DropDownList for RULE
    .HtmlAttributes(new { id = "violationCategoryNumber", style = "width: 99%;", @class = "large-links" })
    .DataTextField("ViolationCategoryNumber")
    .DataValueField("ViolationCategoryNumber")
    .DataSource(source =>
    {
        source.Read(read =>
        {
            read.Action("GetIncidentViolations", "IncidentViolation").Data("filterCreateIncidentViolation");
        })
        .ServerFiltering(true);
    })
    .CascadeFrom("incidentCategoryCode")
    .CascadeFromField("IncidentCategoryCode")
    )

    Code for my filter:

    function filterCreateIncidentViolation() {
        return {
            code: $("#incidentCategoryCode").val(),
            incidentViolationCodeFilter: $("#violationCategoryNumber").data("kendoDropDownList").value()
        };
    }

     

    Any ideas on this would be greatly appreciated,

    Bob Mathis

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    254 posts

    Posted 03 Jan Link to this post

    Hello Bob,

    Please find attached a sample project we prepared to recreate the described scenario. Unfortunately we were unable to observe the described behavior.

    Would you please modify the attached project so that it better represents your case and reproduces the issue and send it back to us along with more detailed steps for reproducing it? Thus, we would be able to investigate locally and help you more efficiently.

    Meanwhile, would you please check for any JavaScript errors in the browser's console that could prevent the proper behavior of the widgets? 

    Regards,
    Peter Milchev
    Telerik by Progress
    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 visualization (charts) and form elements.
  3. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 04 Jan Link to this post

    I am going through your code trying to understand it so I can try to apply it to my project. I will let you know what I find.
    However, I am not sure how to check for JavaScript errors on a popup window. Using the F12 tools, I can only see the Main Page that the window was called from.
    Is there some trick to use to be able to troubleshoot the window?

    Thanks,
    Bob
  4. Peter Milchev
    Admin
    Peter Milchev avatar
    254 posts

    Posted 06 Jan Link to this post

    Hello Bob,

    Take your time reviewing the project. 

    As for your question, doesn't pressing F12 work when you focus the popup window? Also, here is a forum thread where debugging in a popup window is discussed: How to debug javascript as a popup window loads?

    Regards,
    Peter Milchev
    Telerik by Progress
    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 visualization (charts) and form elements.
  5. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 09 Jan in reply to Peter Milchev Link to this post

    Actually, neither one of these work. Either way, F12 ands up showing the page that called the popup and nowhere does it show the popup.
  6. Peter Milchev
    Admin
    Peter Milchev avatar
    254 posts

    Posted 11 Jan Link to this post

    Hello Bob,

    Right clicking the popup window and selecting "Inspect"(Chrome) or "Inspect Element"(IE) should open the DevTools or F12 tools for the popup window. 

    Regards,
    Peter Milchev
    Telerik by Progress
    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 visualization (charts) and form elements.
  7. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 11 Jan in reply to Peter Milchev Link to this post

    Neither of those work for what I need to do. I need to examine the code in the popup window. Using either the IE or Chrome methods you described only brings up the code for the page that called the window and not the window itself.
  8. Peter Milchev
    Admin
    Peter Milchev avatar
    254 posts

    Posted 13 Jan Link to this post

    Hello Bob,

    Here is a screencast that demonstrating how to check the content of the popup window, using "right click -> Inspect" in Chrome. It also shows how the console context is changed when different elements are inspected.

    Regards,
    Peter Milchev
    Telerik by Progress
    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 visualization (charts) and form elements.
  9. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 17 Jan in reply to Peter Milchev Link to this post

    That doesn't help either. Even in your screencast, you don't get to the JavaScript for the popup and I can't get to it when I try, either.
    I guess I'm just going to have to put in a lot of "alerts" and "console.writes" and try to troubleshoot it that way.

Back to Top