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

[Solved] Resizing Grid Height

4 Answers 287 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.
Joel Martinez
Top achievements
Rank 1
Joel Martinez asked on 19 May 2010, 04:47 AM
Hi ... I need a grid that I can dynamically resize the height via javascript based on a few things. Does the client-side API support this?

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 19 May 2010, 07:29 AM
Hello Joel Martinez,

You can use jquery for that:
  1. If your grid is scrollable:
    $('#Grid .t-grid-content').height('400px');
  2. If the grid is not scrollable:
    $('#Grid  > table').height('400px');
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
Pat
Top achievements
Rank 1
answered on 23 Feb 2011, 10:36 PM
I have non scrollable grids and this is not working for me.

At best, setting height server side, I can get the outer most border edge to be the right height (but I can't get that border edge to change from javascript).

But then, if there are not enough rows to fill that space, the grid footer pager bar is not at the bottom, it's just at the bottom of wherever the last row happens to be.
0
Jim
Top achievements
Rank 1
answered on 19 Jul 2011, 01:02 PM
I have a similar question, but rather than specifying grid height in pixels, I'd like to specify the number of rows to display per page.

Thanks,
Jim
0
Dimo
Telerik team
answered on 19 Jul 2011, 01:49 PM
Hi Jim,

If I understand you correctly, you want to control the page size. This can be accomplished with the PageSize property, as shown in the documentation:

http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-paging.html

Alternatively, you can provide the users with the ability to change the page size with a dropdown inside the pager (disabled by default):

http://demos.telerik.com/aspnet-mvc/Grid/Paging?theme=vista

Greetings,
Dimo
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Joel Martinez
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Pat
Top achievements
Rank 1
Jim
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or