Kendo Window refresh error

2 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    13 posts
    Member since:
    Apr 2013

    Posted 10 Sep 2014 Link to this post


    I got this window that the second time is called a JavaScript error shows “TypeError: Cannot read property ‘refresh’ is undefined’
    Please help.

    ~~~~~~~~~~~~~~~~~~~~ Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    <a onclick="verReporte()" class="btn btn-primary">Ver Reporte</a>

    function verReporte() {        var precinto = $("#ddlPrecinto").val();
            var unidad = $("#ddlUnidad").val();
            if (unidad == "<Todos>") {           
                unidad = '';        };
           var status = $("#ddlStatus").val(); 
           var category = $("#ddlCategory").val();
           var data = { reportname: "VoterList.trdx", parameters: "Precinto=" + precinto + ",Unidad=" + unidad + ",Status=" + status + ",Category=" + category };
           var myurl = '@Url.Action("ReportViewerGeneric","Report")';        

           var mywindow = $("#window").data("kendoWindow");
                     url: myurl,   
                     data: data       
  2. Dimo
    Dimo avatar
    8318 posts

    Posted 11 Sep 2014 Link to this post

    Hi Ricardo,

    Generally, there are several possible causes for such a Javascript error:

    + the Window is referenced before the widget is initialized on the page
    + the Window is referenced after the widget has been destroyed
    + a second jQuery instance is registered on the page after the Kendo UI scripts, which deletes all Kendo UI widgets

    Judging by the provided information, I would exclude the first option, so please focus on the other two. To begin with, you can debug the script and check whether $("#window") returns the expected DOM element.

    In case you need further assistance, please provide a runnable demo.

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