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

How to send window to the back?

4 Answers 103 Views
Window
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 26 Feb 2014, 12:14 AM

I noticed a nice and handy "toFront" function on the kendoWindow. I was wondering if there was something just as handy to send it to the back, but not behind the main page and still visible?

I due know I could just get the div(or whatever element the kendoWidget was initialized on) and set the z-index css to 0 (or some other low value), but I'm wondering if I may have over looked a much simpler way of doing that, like a "toBack" function?


Part of my reason for asking is that I have some older code which does not use Kendo UI, and it creates error dialogs using jQuery.dialog, but these dialogs appear behind the kendoWindow, and I need them in front. My current solution is to just close the window when an error happens, since I don't want to mess with z-index css.


4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Feb 2014, 07:40 AM
Hi Keith,

I am afraid the Window widget does not have a "toBack" method, because toFront() already covers the required functionality in a better and simpler way. Moreover, even if it had such a method, it would not take into account non-Kendo UI popups.

You will need to change the z-index style of the desired Window instance manually. This is a safe operation, which will not interfere with existing Window behavior.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Keith
Top achievements
Rank 1
answered on 04 Mar 2014, 11:48 PM

I noticed that the default z-index for kendo usually, with some exceptions, is set with 10000 increments (1,10001. or 200001 etc), with some increments of 100 or 1000. Could you provide some basic guidelines as to the guidelines or rules that are followed in kendo CSS for determining or choosing a z-index for a certain class?
0
Dimo
Telerik team
answered on 05 Mar 2014, 09:41 AM
Hello Keith,

Generally, the z-index values are determined mostly by requirements related to which widget should be on top of other widgets. For example, selection marquees and elements related to dragging should be on top of everything else. Tooltips should be over Windows, except validation tooltips. There is no way to handle (even predict) all possible integration / overlay scenarios perfectly, so we just use common sense and amend the z-index values when necessary. There are no fixed rules.

It is also worth mentioning that some z-index values are calculated on the fly, depending on z-index values applied to affecting elements on the page. For example this is how DateTimePickers work to ensure that their popups open on top of everything else.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Keith
Top achievements
Rank 1
answered on 05 Mar 2014, 07:43 PM
Thanks you. That's helpful to know.
Tags
Window
Asked by
Keith
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Keith
Top achievements
Rank 1
Share this question
or