Window positioning

4 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
    2156 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. Kendo UI is VS 2017 Ready
  4. Markosyan Artur
    Markosyan Artur 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;
     }

  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 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!
     
Back to Top
Kendo UI is VS 2017 Ready