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

PagerStyle-Horizontal align not moving pager

5 Answers 560 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 20 Jan 2009, 05:38 PM
Hello,

I am trying to use a numeric pager on both the top and bottom of a Radgrid and align the pager all the way to the right side of the grid.  I am able to get the pager to be numeric and be placed on the top and the bottom of the grid, but am unable to move the pager from the left side to the right side.

I have tried using:

PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages"  PagerStyle-Position="TopAndBottom"

in the <telerik:RadGrid tag,
 
as well as

 

<PagerStyle Mode="NumericPages" Position="TopAndBottom" HorizontalAlign="Right" />

 


and in the codebehind as

RadGrid.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

RadGrid.PagerStyle.Mode =

GridPagerMode.NumericPages;

 

RadGrid.PagerStyle.HorizontalAlign =

HorizontalAlign.Right;


in each instance the numeric pager appears at the top and bottom of the grid, but is left aligned.  I also do not receive any errors at all.  What do I need to do differently in order to move the numeric pager from the left side of the grid to the right?

Thank you for any help that I may receive.

Aaron

 




5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Jan 2009, 04:41 AM
Hello Aaron,

You can set the Css class for the PagerItem and set styles in the class as shown below:
c# :
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            GridPagerItem pagerItem = (GridPagerItem)e.Item; 
            pagerItem.CssClass = "pager"
        }       
    } 

CSS :
 <style type="text/css"
   .pager 
    { 
      padding-left:95%; 
    } 
 </style> 

Thanks
Princy.
0
Arif
Top achievements
Rank 1
answered on 05 Jun 2009, 06:00 PM
Hi Princy,

It didn't help me to align it left. I followed your code and my existing aspx for PagerStyle -

<

 

telerik:RadGrid .....

PagerStyle-AlwaysVisible

 

="true" FooterStyle-HorizontalAlign="Left" >

 

 

<PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="false" />

PLEASE HELP ME TO GET IT LEFT ALIGNED.

Thanks,
Arif

 

0
Shinu
Top achievements
Rank 2
answered on 08 Jun 2009, 06:13 AM
Hi Arif,

I tried setting the PagerStyle-Mode as you have shown above and it is left aligned by default. And also the above given code snippet is to right align the Pager. You may try the following code snippet to left align the Grid pager.

CS:
 
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            GridPagerItem pagerItem = (GridPagerItem)e.Item; 
            pagerItem.CssClass = "MyPager"
        }  
    } 

Style.Css:
 
 <title>Untitled Page</title> 
    <style type="text/css"
 
    .MyPager 
    { 
     padding-right:70%;  
    } 
    
   </style> 

Regards
Shinu



0
Rory
Top achievements
Rank 1
answered on 31 Jul 2009, 01:14 AM

Did anyone ever figure out how to align all the pager items to the left? Our grid has the pager on the left and count # of pages on right so annoying when its a very wide grid.

I tried using all the approaches above with no luck.

The closest I got was using this but it makes the combobox page selector out of whack.

.RadGrid_WebBlue .rgPager div  
{  
    float:left !important;  

Please Help.
Thanks.
0
Guss
Top achievements
Rank 2
Veteran
answered on 10 Feb 2021, 01:09 AM

Some similar post here, but how to align the info message left, and the pager elements to the right.... and have everything in the correct order.

https://www.telerik.com/forums/grid-pager-style#BKlQxTrrb0SOiXskH8kTMw

Tags
Grid
Asked by
Aaron
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Arif
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Rory
Top achievements
Rank 1
Guss
Top achievements
Rank 2
Veteran
Share this question
or