Max height on grid?

2 Answers 4432 Views
Grid
Basem
Top achievements
Rank 1
Basem asked on 29 May 2012, 09:45 PM
Is there a way to define a max height on a grid? Then anything larger would utilize the scrolling. Can this be done?

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 30 May 2012, 03:50 PM
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!
DJo
Top achievements
Rank 1
commented on 21 May 2013, 07:39 PM

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?
0
Alexander Valchev
Telerik team
answered on 24 May 2013, 11:53 AM
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!
DJo
Top achievements
Rank 1
commented on 24 May 2013, 03:20 PM

Looks good to me. Doesn't work in my application though. I made due using paging instead and that's fine with me.
Tags
Grid
Asked by
Basem
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Alexander Valchev
Telerik team
Share this question
or