Iterating through all Kendo Windows on a page

2 posts, 0 answers
  1. Stewart
    Stewart avatar
    3 posts
    Member since:
    Jun 2013

    Posted 05 Jun 2014 Link to this post


    I hope this is something relatively simple to ask, I have looked around a little and couldn't find a decent enough resource to solve me problem.

    I want to find all kendo windows on a given page without having to reference their id's. The purpose of this is that I am attempting to resize all kendo windows based on when the browser window resize event fires. 

    Whilst it could be possible to store an array of window id's I would prefer to not have to maintain that additional code.

    Thank you in advance for any assistance you can provide.
  2. Alex Gyoshev
    Alex Gyoshev avatar
    2527 posts

    Posted 06 Jun 2014 Link to this post

    Hello Stewart,

    The elements that hold the window instance have a data-role attribute. Thus, the following code will get them all:

    $("[data-role=window]").each(function() {
        var windowObject = $(this).data("kendoWindow");
        // use the window client-side object

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