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

How to get pager at bttom of grid instead of just under last row

3 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Evgeny
Top achievements
Rank 1
Evgeny asked on 12 Jul 2008, 02:38 PM
Hello,

I have RadGrid with fixed height (let's say 300px) and paging enable.
Layout of the pager is Ok when there are enough rows to fill PageSize (i.e. when PageSize 10 and there are 10 rows on the page, it's Ok). But when there are less rows than PageSize (e.g. 5 rows when page size is 10), the pager renders just under the last row instead of the most bottom of the grid.

To illustrate:
Here is what I see when there are enough rows:
--------------top of the grid
|row1
|row2
|...
|row10
|pager (1 2 3 ...)
--------------bottom of the grid
>>>>>> OK

Here is what I see when there are less rows than PageSize:
--------------top of the grid
|row1
|row2
|row3(last row on page, but PageSize is 10)
|pager (1 2 3 ...)
|
|
--------------bottom of the grid
 >>>>>> NOT OK, WANTED:
--------------top of the grid
|row1
|row2
|row3(last row on page, but PageSize is 10)
|
|
|pager (1 2 3 ...)
--------------bottom of the grid

Can it be fixed? Maybe the question is dumb and I'm just missing some property to be set, but I could not find it so far.

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jul 2008, 05:07 AM
Hi Evgeny,


Try setting the UseStaticHeader property for the Grid to true and see whether it helps.

ASPX:
<telerik:RadGrid ID="RadGrid1"   runat="server"  Width="900px"   AllowPaging="True" PageSize="10" DataSourceID="SqlDataSource2"  > 
             <ClientSettings> 
              <Scrolling  AllowScroll="true" UseStaticHeaders="true"    /> 
             </ClientSettings> 


Thanks
Shinu.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 18 Sep 2008, 10:49 AM

Hello Shinu

I want to do same thing that Evgeny, but If i put allowScroll to true, the scrollbars appears in my RadGrid, and I don't want to show scrollbars.

And if I put allowScroll to false, the pager doesn't renders just under the last row of the grid.

Best regards

0
Sebastian
Telerik team
answered on 18 Sep 2008, 10:53 AM
Hi Juan,

You may consider modifying the height (or the scrollable div height when scrolling is enabled) of the grid (intercepting the OnGridCreated client event) to be in conformance with your preferences. Review the following help article for further details:

http://www.telerik.com/help/aspnet-ajax/grdresizegridwithscrollingwhenlessdata.html
http://www.telerik.com/help/aspnet-ajax/grdchangescrollheightatruntime.html

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Evgeny
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Iosu Buenetxea
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or