How to send window to the back?

5 posts, 0 answers
  1. Keith
    Keith avatar
    35 posts
    Member since:
    Sep 2013

    Posted 25 Feb 2014 Link to this post


    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.


  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 26 Feb 2014 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Keith
    Keith avatar
    35 posts
    Member since:
    Sep 2013

    Posted 04 Mar 2014 in reply to Dimo Link to this post


    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?
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 05 Mar 2014 Link to this post

    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!
  6. Keith
    Keith avatar
    35 posts
    Member since:
    Sep 2013

    Posted 05 Mar 2014 in reply to Dimo Link to this post

    Thanks you. That's helpful to know.
Back to Top
Kendo UI is VS 2017 Ready