Keith Keith - 1 month ago 8
CSS Question

Max-Height to kendo grid cells

I haven't been able to find a way to do a max-height to a tr or td tag in a Kendo grid. Is there a way to do this where height is 100% and max-height is set to 200px? The grid is scrollable but height is set to 500px so scrolling is within the grid.

I tried:

div.k-grid-content tr td{
max-height: 200px;
}

or

div.k-grid-content tr {
max-height: 200px;
}

<div id="grid"></div>

Answer

Table cells and rows ignore min and max height styles in general. Height behaves like min-height.

What you can do is use a column template and wrap the cell content in a div with a max-height and overflow style.

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.template