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

how to prevent paging controls from moving around the page?

2 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phil Hadley
Top achievements
Rank 1
Phil Hadley asked on 05 Oct 2011, 09:07 PM
My paged radgrid (client-side bound) has a small problem:  When I reach the last page, there are fewer than <PageSize> rows in it, which causes the grid to get shorter. This is inconvenient because you have to move your mouse up the page a bit to reach the paging controls.  Is there a way to keep the last page from rolling up?  I just want to keep my paging controls from jumping all over the screen.

This behavior can be seen in the "numeric pager" example on this demo: http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/paging/defaultcs.aspx

Phil

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 10 Oct 2011, 11:46 AM
Hi Phil,

In order to achieve your goal, you can enable scrolling with static headers and set ScrollHeight so it fits the grid items for the current page. Check the attached demo illustrating this approach.

Regards,
Iana Tsolova
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Phil Hadley
Top achievements
Rank 1
answered on 10 Oct 2011, 03:37 PM
Thanks!  Works great.

All I had to do was add this markup to the <ClientSettings> section:

          <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="240px" />

My rows were 24 pixels high, so 10 rows x 24 px each = 240px!

Tags
Grid
Asked by
Phil Hadley
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Phil Hadley
Top achievements
Rank 1
Share this question
or