destroy window on close

10 posts, 0 answers
  1. Henk Jelt
    Henk Jelt avatar
    19 posts
    Member since:
    Jun 2012

    Posted 20 Jun 2012 Link to this post


    I create a window, which I would like to destroy after closing, but I cannot get it to work.

    I have found various hints in the forum, but if I implement them, the window keeps coming back after refreshing the screen (ie performing a feedback).

    The code which I use to initialize the window is pretty standard:
    		<script type="text/javascript">
    	 $(document).ready(function () {
    		$('#windows').css('z-index', 9000);
    			actions: [ "Maximize""Minimize""Close"],
    			draggable: true,
    			height: "600px",
    			modal: false,
    			resizable: true,
    			title: "<%=ViewData("paymentenginetext")%><%=  ViewData("invoicenr")%>",
    			width: "810px"
    		var kendoWindow = $("#Payment").data("kendoWindow");

    The way to destroy the window is to perform the function destroy at deactivation, but where and how do I put this in my code?


    Henk Jelt Hoving 
  2. Mickie
    Mickie avatar
    4 posts
    Member since:
    May 2012

    Posted 27 Jun 2012 Link to this post

    Hi Henk,

    I recently needed to implement a destroy after closing and put this together to play around with it (fyi there is some issue w/ this fiddle in IE but it works ok in Chrome and FF), maybe this will help you(?): 

    I'm seeing in the forums and documentation a recommendation that you do not need to destroy a window, particularly if you are going to use it again.  But in my case I needed to because we had implemented an edit form in a kendo window and found that if you opened the window, made some changes then closed the window without saving, the next time you opened the window - prior to the content being refreshed, you initially saw those last changes that you didn't save.  So, we wanted a way to be able to remove the window and its contents from the DOM and then later recreate it on click of an edit button.  (additional note: even though there is some issue w/ that fiddle in IE the technique works just fine in our app in all browsers)

        - Mickie
  3. Cary Abramoff
    Cary Abramoff avatar
    20 posts
    Member since:
    Aug 2009

    Posted 28 May 2013 Link to this post

    You just helped me make quick work of this issue with a simple copy & paste from your fiddle. Muchas Gracias.
  4. Mickie
    Mickie avatar
    4 posts
    Member since:
    May 2012

    Posted 05 Jun 2013 Link to this post

    Great - glad that was helpful to you!
  5. Tareq
    Tareq avatar
    2 posts
    Member since:
    Jun 2013

    Posted 10 Jul 2013 Link to this post

    Thanks Cary! that was very helpful. :)
  6. Bryan
    Bryan avatar
    1 posts
    Member since:
    Mar 2012

    Posted 07 Nov 2013 Link to this post

    Thanks Mickie, this was driving me crazy, too.   Creating a new element for the window as a container was the fix for me:

    $("#windowcontainer").append("<div id='window'></div>");
  7. Doug
    Doug avatar
    30 posts
    Member since:
    Feb 2005

    Posted 26 Jan 2020 Link to this post

    Another option that might work for you is to simply clear the content of the window when you are done with it.

  8. Alejandro
    Alejandro avatar
    1 posts
    Member since:
    Apr 2020

    Posted 18 Jun 2020 in reply to Mickie Link to this post

    Your code helped solve a similar issue I had. Thanks so much!
  9. Hammy
    Hammy avatar
    4 posts
    Member since:
    Dec 2018

    Posted 24 Jun 2020 in reply to Mickie Link to this post

    Hi There, 

    In my vue component I have a list where user can click and view more details in a kendo window component. The user can open multiple non-modal draggable windows without blocking/dimming the main page.


    The minimize only collapses' the window body which is not great use of screen space with just seeing the collapsed window tile bars stacking up.


    Is there a way, we can move / dock the minimize kendo window to the corners of the screen and restore them when un-minimize?




    It would be great if the window component can supports docking. For example 

    Many thanks

    Hammy Babar


  10. Ivan Danchev
    Ivan Danchev avatar
    2189 posts

    Posted 29 Jun 2020 Link to this post

    Hello Hammy,

    Currently, the Window does not have such docking capabilities, but this is a valid suggestion, so you could log it as a feature request in our Feedback Portal:

    We will consider implementing it, based on the interest the community shows in it.

    Ivan Danchev
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top