Newbie coming from JQuery UI, re-show window issue

2 posts, 0 answers
  1. Robert
    Robert avatar
    27 posts
    Member since:
    Aug 2014

    Posted 08 Aug 2014 Link to this post

    As the title states, I'm coming from a JQuery UI background, using the jQuery Dialog. 

    With JQuery UI, I just create a div like so: <div id="dlgQuestion" style="display: none;"></div>

    Then I can show a dialog based on that div as often as I like with:


    And if I close it using the escape key or a close button in the dialog, I can re-open it the same way without issues, the dom has not had the div removed.

    I've successfully figured out how to show a kendo window wiith similar code:

                actions: ["Minimize", "Maximize", "Close"],
                height: 500,
                width: 500,
                visible: true,
                position: { top: 100, left: 300 }

    but, once I close it I cannot show it again.

    I've read through a lot of the documentation, but this is eluding me. I probably need to use a destroy function somehow before attempting to re-show it, but maybe someone could give me more precise guidance.

    Side question, is coming from JQuery UI an advantage or a hindrance due to having to "un-learn" old habits?

    Thanks, Bob Graham
  2. Kiril Nikolov
    Kiril Nikolov avatar
    2598 posts

    Posted 12 Aug 2014 Link to this post

    Hello Robert,

    The problem is caused by the fact that you are initializing the window more than once. Please note that every time you call .kendoWindow() , you are creating a new widget instance, that overrides the old one and can cause the problem that you are facing. This is why we suggest the usage of the open/close methods, that will not initialize a new widget every time, here is more information about it:

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