Max height on grid?

5 posts, 1 answers
  1. Basem
    Basem avatar
    27 posts
    Member since:
    Dec 2010

    Posted 29 May 2012 Link to this post

    Is there a way to define a max height on a grid? Then anything larger would utilize the scrolling. Can this be done?
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 30 May 2012 Link to this post

    Hi Basem,

    You could set a max-height to the grid content container using CSS. Hence when the grid content is larger than this height the scroller will be enabled. For example: 
    .k-grid-content {
       max-height: 200px;
    }

    Please note that in order to use this approach the Kendo UI Grid must be configured as scrollable.

     
    Greetings,
    Iliana Nikolova
    the Telerik team
    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. DJo
    DJo avatar
    23 posts
    Member since:
    Nov 2012

    Posted 21 May 2013 Link to this post

    This doesn't work, in my experience.

    The div gets the max-height style, but the grid does not respect it so it continues past the end of the div without creating a scrollbar.

    Other ideas?
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 24 May 2013 Link to this post

    Hello DJo,

    Could you please check this sample and let me know what I am missing?

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. DJo
    DJo avatar
    23 posts
    Member since:
    Nov 2012

    Posted 24 May 2013 Link to this post

    Looks good to me. Doesn't work in my application though. I made due using paging instead and that's fine with me.
Back to Top
Kendo UI is VS 2017 Ready