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

Consistent Grid Height when Grouping

3 Answers 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Levi
Top achievements
Rank 1
Levi asked on 11 Nov 2008, 08:47 PM
Do you have any examples of grids that remain the same height even when grouping, without using scrollbars? I ran across an example online that allowed you to group by one or more fields and it automatically adjusted the number of records per page to fit the additional grouping rows, avoiding the use of a scrollbar. This is really convenient for my customers since the pager doesn't keep moving each time you change pages (due to the height increasing when grouping is used. I'm assuming the grouping row heights would have to be the same height as the regular data rows, etc., so it always totals the same number of pixels.Do you have any examples on how this might be accomplished using RadGrid? If not, do you have any plans to implement such as feature. I can send the link to the example if requested. From a usability standpoint, this would be a great feature.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Nov 2008, 12:04 PM
Hello Levi,

Yes, you can change the RadGrid PageSize in order to maintain the control's height after grouping. Obviously you have found the online example, which demonstrates this, so feel free to use it.

Alternatively, you can enable RadGrid scrolling and set UseStaticHeaders="true". In this case the height of RadGrid will be preserved during all operations (such as grouping, filtering, etc) and you will not have to make any adjustments at runtime.

I would recommend using the second approach.

Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Levi
Top achievements
Rank 1
answered on 17 Nov 2008, 02:43 PM
It's not an online code example, it's another company and it's built in to the grid so there is no code for me to look at. I didn't post the link just because i'm not trying to promote other companies here, etc. I'm assuming I would need some way to determine the number of groupings on a given page and then multiply that by the number of pixels that it takes for each group? Can you tell me how I could determine this? I want to avoid using a scrollbar. If this is simple to do, I hope you guys will consider adding an example of this to your demos section in the future. If you could guide me in the right direction that would be great.Thanks!
Levi
0
Dimo
Telerik team
answered on 18 Nov 2008, 02:17 PM
Hello Levi,

I thought you have found a code library or a KB article, which shows what you need, however, it seems there is still no such example on our site. So here it is.


Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Levi
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Levi
Top achievements
Rank 1
Share this question
or