Not accessible with kendo content

2 posts, 0 answers
  1. ilya
    ilya avatar
    3 posts
    Member since:
    Sep 2006

    Posted 25 Mar 2015 Link to this post

    After update to Q1 2015 we face a problem where loading partial with kendo components into kendo window kills is as well as access to components like grid on parent page. Workaround: enable iframe, which is not an option since window should return a result

    How to reproduce: 
    1. Grid with button to call the window(only calling column provided): 

     col.Bound(b => b.FieldMapId).ClientTemplate("# if (DataType.toLowerCase() ==\"csv\"){ # <button id='FiledMapBtn_#=FieldMapId#' class='k-button' data-fieldMapId='#=FieldMapId#' data-feedId='#=Id#' data-feedtype='#=FeedType#' onClick='ShowFieldMapWindow(this)'>Edit Maps</button> # } #")
    .Template(t => t.DataType.ToLower() == "csv" ? "<button style='display:none' id='FiledMapBtn_'" + t.FieldMapId + "' class='k-button' data-fieldMapId='" + t.FieldMapId + "' data-feedId='" + t.Id + "' data-feedtype='" + t.FeedType + "'   >Edit Maps</button>" : "").Title("Csv Mapping").Filterable(false);

    2. Window set as invisible:
                               .Title("Create/Edit new csv map")
                               .Actions(a => a.Close())
                               .Events(e => e.Close("FieldMapWindow_OnClose")))

    3. JS To Open window and request content:
    function ShowFieldMapWindow(sender) {
            var csvImportWindow = $("#FieldMapWindow").data("kendoWindow");
                url: url goes here,
                type: "GET"

    4. it loads partial content with layout set to partial view with kendo elements. Below is a layout for window partial
    <!DOCTYPE html>
        <meta charset="utf-8" />



        <link href="@Styles.Url("~/Content/Kendo/KendoDefault")" rel="stylesheet" async />
        @*<link type="text/css" rel="stylesheet" href="" />*@

    5. We use bundles: heres whats in scripts bundle:
      bundles.Add(new ScriptBundle("~/bundles/Scripts/").Include(

                    "~/Scripts/kendo/kendo.all.min.js", // or kendo.all.* if you want to use Kendo UI Web and Kendo UI DataViz

    Please note that everything was working before update. !!!   Please advice  !

  2. Dimo
    Dimo avatar
    8318 posts

    Posted 27 Mar 2015 Link to this post

    Hi Ilya,

    The provided implementation is invalid and will not work with any Kendo UI version. Obviously, the view, which is loaded inside the Window, is not a partial view, but a full web page, which breaks the main page's HTML validation, and registers duplicate jQuery script, which deletes all existing Kendo UI widget instances.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top