Hide window with bootstrap hidden-xs class

3 posts, 1 answers
  1. Mark
    Mark avatar
    90 posts
    Member since:
    Jul 2014

    Posted 25 Aug 2015 Link to this post

    Hi there,

    I have a Telerik window opened on page load based on server side variables.  However, I don't want this window to display for mobiles - for other site controls I apply the bootstrap 'hidden-xs' class to the control to not render it, but this doesn't work on the Kendo Window control.  How can I achieve this - my window is drawn out by server side code which knows nothing about the browser dimensions?

    I also tried setting the .Visible property to false and then showing it on the Open() event based on some jQuery - but this didn't work because the Open() event doesn't get triggered if the .Visible property is initially set to false.

    Please can you advise how I can go about achieving my requirements?

    Thanks, Mark

  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 27 Aug 2015 Link to this post

    Hi Mark,

    You could achieve a similar behavior with Kendo UI Window using the following CSS:
    @media only screen and (max-width: 767px) {
       .k-window {
           display: none !important;
       }
    }

    Regards,
    Iliana Nikolova
    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. Mark
    Mark avatar
    90 posts
    Member since:
    Jul 2014

    Posted 27 Aug 2015 in reply to Iliana Nikolova Link to this post

    That worked perfectly.

    Thanks, Mark

Back to Top