How to close a single kendo window from group of available kendo window

2 posts, 0 answers
  1. Anand
    Anand avatar
    4 posts
    Member since:
    Aug 2020

    Posted 18 Nov 2020 Link to this post



    On my page i have two kendo dialog window and both are having the same div class and trying to close the window using following code




    But above code only close the first window not the second one. I want to close the second window.


    above code returns

    returns 2.



    How can i close the second window instead of first one?


    Kindly suggest.

  2. Stoyan
    Stoyan avatar
    32 posts

    Posted 19 Nov 2020 Link to this post

    Hi, Anand, 
    Thank you for your question.

    You were almost there. I would suggest using the array indexes provided by the jQuery class selector. 

    var secondWindow = $(".myClass")[1];
    var window2 = $(secondWindow).data("kendoWindow");

    You can get the Window widget instance for the respective index of the elements found and then close it.

    Here is a runnable example:

    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

Back to Top