This is a migrated thread and some comments may be shown as answers.

min-height on a grid

2 Answers 2595 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 22 Dec 2014, 10:38 PM
For the client side grid, is there a way to initially set the grid to a min-height that can be overruled if there are many rows at which point the grid would default to a larger container constraint or to the number of rows to show constraint.  The challenge here is to show the progress icon on loading.

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Dec 2014, 09:30 AM
Hi Patrick,

Yes, there is a way:

http://docs.telerik.com/kendo-ui/web/grid/appearance#allow-the-grid-height-to-vary-within-certain-limits

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
SUNIL
Top achievements
Rank 2
Iron
answered on 08 Jun 2018, 12:50 PM

I had the same issue and the way I solved it was by setting a CSS for min height of content part of grid, and then in databinding event of grid this min-height needs to be set to 0px. This way, the loading image displays initially and when rows are rendered then grid sizes its height in a normal manner.

CSS

.k-grid-content { min-height:50px; }

 

Databinding event

function dataBinding(e) {
    $(".k-grid-content").css("min-height", "0px");
}

 

 

Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dimo
Telerik team
SUNIL
Top achievements
Rank 2
Iron
Share this question
or