Window positioning

9 posts, 0 answers
  1. Nicholas Walker
    Nicholas Walker avatar
    30 posts
    Member since:
    Jul 2008

    Posted 18 Feb 2013 Link to this post

    There isn't a function in kendo for a window to set the location / position of the window. It took me 30 minutes to figure this out, hopefully it'll help someone.

    var kendoWindow = $("#window").data("kendoWindow");

    kendowWindow.element.parent().css({left:400,top:200});

    The kendowWindow object contains the content of the window, and that is contained inside another div which has the window bar.
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2312 posts

    Posted 19 Feb 2013 Link to this post

    Hi Nicholas,

    Yes the approach you are mentioning will work. An alternative approach is:

    $("#windowId").closest(".k-window").css({
        top: 200,
        left: 400
    });

      Greetings,
    Dimiter Madjarov
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. MarkosyanArtur
    MarkosyanArtur avatar
    1 posts
    Member since:
    Apr 2015

    Posted 20 May 2015 Link to this post

    here is another option:

     

    var win = $("#window").data("kendoWindow");
    var winWrapper = win.wrapper;
    winWrapper.addClass("myWindowClass");

     

    then you can add needed parameters into css:

    .myWindowClass {
       top: 200;
       left: 400;
     }

  4. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2312 posts

    Posted 20 May 2015 Link to this post

    Hello Markosyan Artur,

    Thanks for sharing the approach. Have a great day!

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. satyadharma
    satyadharma avatar
    3 posts
    Member since:
    Dec 2019

    Posted 06 Dec 2019 in reply to Dimiter Madjarov Link to this post

    I am adding multiple kendoWindow dynamically by adding $("<div></div>").appendTo("#body1").kendoWindow({...}). I am adding these div's to the body one by one. But the kendo windows are overlapping each other instead of appearing one by one. Can you help how to display each kendo window one after another.
  6. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2153 posts

    Posted 10 Dec 2019 Link to this post

    Hello Satyadharma,

    To display the Windows one after the other set their position.top configuration option, as demonstrated in this example:

    https://dojo.telerik.com/uDaziTEp

     

    Regards,
    Ivan Danchev
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  7. satyadharma
    satyadharma avatar
    3 posts
    Member since:
    Dec 2019

    Posted 10 Dec 2019 Link to this post

    Any reason why kendo window doesn't appear based on order of div's in which it is placed? I checked with Kendo Grid and it worked well with positions. i.e. based on the div's it is placed, it positions itself automatically.
  8. satyadharma
    satyadharma avatar
    3 posts
    Member since:
    Dec 2019

    Posted 10 Dec 2019 Link to this post

    Hi Ivan,

    My requirement doesn't allow me to set positions of the kendo window as I am loading multiple partial pages on 1 page and I don't have control over the partial page contents. What I have control is only on the ordering of loading of these pages. Kendo Grid and others seems to work well i.e. they order themselves in the div's automatically. But, kendo Window is not behaving the same way. It is always creating a separate div at the end of the page which is not expected. Any idea why this separate div is getting created.

    Thanks,

    Satya

  9. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2153 posts

    Posted 12 Dec 2019 Link to this post

    Hi Satya,

    As discussed in the support ticket, the Window's div element can be appended to another element with the appendTo option: https://dojo.telerik.com/eNUbUleJ

    This allows you to display multiple Windows one after the other without setting their position configuration option.

    Regards,
    Ivan Danchev
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top