Window will only close once

2 posts, 0 answers
  1. Chris
    Chris avatar
    19 posts
    Member since:
    Feb 2016

    Posted 23 May 2016 Link to this post


    I have created a kendoWindow with this code

    function CustomerPopupEditor() {
        $("#showCustomerEdit").append("<div id='window'></div>");
        var myWindow = $("#window").kendoWindow({
            width: "80%",
            height: "47%",
            title: "Customer",
            content: "/Customer/CustomerEditor",
            modal: true,
            actions: [
            close: function (e) {


    and I am closing the window using this code

    function CloseTheWindow() {

    this is called on a button click event, when I get this window open, it works fine, I click my Save button it closes it. However if I open it again and try to close it, the window won't close.

    I am not sure if this is enough information or if I need to add more information.



  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2310 posts

    Posted 24 May 2016 Link to this post

    Hello Chris,

    If the CustomerPopUpEditor function is invoked multiple times, it will create multiple Window widget instances with the same id, which is not recommended. I would suggest to include a conditional check if the widget already exists. If it has already been created, you could directly use it's instance to invoke API methods e.g. open() instead of re-creating it.

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