This is a migrated thread and some comments may be shown as answers.

Window positioning

8 Answers 783 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nicholas Walker
Top achievements
Rank 1
Nicholas Walker asked on 18 Feb 2013, 04:44 PM
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.

8 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 19 Feb 2013, 10:17 AM
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!
0
MarkosyanArtur
Top achievements
Rank 1
answered on 20 May 2015, 09:30 AM

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;
 }

0
Dimiter Madjarov
Telerik team
answered on 20 May 2015, 10:00 AM

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!
 
0
satyadharma
Top achievements
Rank 1
answered on 06 Dec 2019, 11:58 AM
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.
0
Ivan Danchev
Telerik team
answered on 10 Dec 2019, 08:27 AM

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.
0
satyadharma
Top achievements
Rank 1
answered on 10 Dec 2019, 10:24 AM
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.
0
satyadharma
Top achievements
Rank 1
answered on 10 Dec 2019, 10:33 AM

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

0
Ivan Danchev
Telerik team
answered on 12 Dec 2019, 09:31 AM

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.
Tags
Window
Asked by
Nicholas Walker
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
MarkosyanArtur
Top achievements
Rank 1
satyadharma
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or