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

[Solved] Set a "Max height"

1 Answer 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Julien
Top achievements
Rank 1
Julien asked on 02 May 2012, 07:56 AM
Hi,

I want to have a scrollable Grid, so I put the .Scrollable() to my Grid. I also saw that I can specify its width with the .Scrollable(c => c.Enabled(true).Height(300)).

But in this case if I've only two rows, I've a empty white space between the last row and the footer.

I want to have a maximum height for the rows(the equivalent of ScrollableHeight of asp.net ajax).

How can I achieve this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 02 May 2012, 12:53 PM
Hi Julien,

You can use:

Html.Telerik().Grid()
        .HtmlAttributes(new { @class = "maxHeight" })
        .Scrollable(scrolling => scrolling.Height("auto"))


.maxHeight  .t-grid-content
{
    max-height: 100px;
}


This setup will work in IE7+ and all other browsers.

All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
Julien
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or