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

[Solved] setting .Scrollable.Height dynamic

3 Answers 175 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.
Gerard Eikelboom
Top achievements
Rank 1
Gerard Eikelboom asked on 21 Jan 2011, 03:47 PM
Hello,
I have a question abou the scrollable.Height of the MVC Grid.
Now we have hardcoded it to a certain height. But our application is resizable with a min height of 768.
So when I resize my screen at the moment the Grid doesn't resize in height. Is there a way to do that?

Regards,
Gerard

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Jan 2011, 08:41 AM
Hi Gerard Eikelboom,

The grid does not resize itself automatically. What you can do is set the scrollable height with JavaScript like this:

$("#Grid .t-grid-content").height(500); // #Grid is the name of the grid without "#"


Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
William
Top achievements
Rank 1
answered on 04 May 2012, 03:25 AM
Hi, I'm new to telerik mvc components.
we should put this line of code $("#Grid .t-grid-content").height(500); 
in which event? OnLoad, OnDataBound or?
Thanks for your help
0
Petur Subev
Telerik team
answered on 04 May 2012, 07:15 AM
Hello William,

The code should be executed if you want to dynamically resize the Grid on the Client. If you want to define the Grid's height you can do it on the server like this:
.Scrollable(scr=>scr.Height(300))


All the best,
Petur Subev
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
Gerard Eikelboom
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
William
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or