How to center the window popup when height is not set?

4 posts, 0 answers
  1. Chris
    Chris avatar
    19 posts
    Member since:
    Feb 2016

    Posted 04 Oct Link to this post

    I have a window that doesn't have its height set, so its height is dynamic based on the window content. Adding .center() doesn't center the window. How do I center the popup when the height isn't set?
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 06 Oct Link to this post

    Hello Chris,

    You can call the center method after applying the height. Like in this dojo: http://dojo.telerik.com/ayALU

    Regards,
    Ianko
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. Chris
    Chris avatar
    19 posts
    Member since:
    Feb 2016

    Posted 06 Oct in reply to Ianko Link to this post

    Hi Ianko,

    I guess my question should be reworded properly. How do I center the window popup horizontally? because I dont want to set the height, I have a window that has tabs in it and inside the tabs the content heights are different. So I would like to not set the height so the window height will change dynamically based on the height of the content, so is it possible to center the window horizontally?

  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 06 Oct Link to this post

    Hello Chris,

    You can again use the center() method on every tab click/select. It will center the dialog window both vertically and horizontally. I assume that the width is the same for each tab container and the actual final result would be a horizontal centering.  

    If this is not the case and the above suggestion does not work, try reproducing this in a dojo (dojo.telerik.com) so that I can take a proper look at the problem.

    Regards,
    Ianko
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready