Search code examples
jquerykendo-uikendo-window

KendoWindow will only open once when called from Kendo ToolBar button


I have looked around at a few links on SO and outside of SO and have seen alot of this type of question, but nothing in the way of why this happens on a toolbar button.

Here is a dojo of it..

here


Solution

  • I was able to get it to work by targeting the window with the kendo data attribute and using the open function:

    function ImClicked(e) {
        //alert(e.target.text() + " is clicked");
    
       var item = $("#showMyWindow"),
            wnd = item.data("kendoWindow");
    
        item.kendoWindow({
            width: "505px",
            height: "315px",
            title: "Hey I'm a Title",
            content: "Howdy, I'm a winda",
            modal: true,
            actions: [
                "Close"
            ],
            close: function (e) {
                $("#showMyWindow").empty();
            }
        }).data("kendoWindow").center();
          wnd.open();
    };
    

    Updated dojo

    Found this solution in this Telerik forum post: http://www.telerik.com/forums/window-only-opens-once