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

4 posts, 0 answers
  1. Evgeny
    Evgeny avatar
    17 posts
    Member since:
    Jun 2008

    Posted 12 Jul 2008 Link to this post

    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.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Jul 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 18 Sep 2008 Link to this post

    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

  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 18 Sep 2008 Link to this post

    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.
Back to Top