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

RadDataPager Alignment

4 Answers 132 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jeff Gorman
Top achievements
Rank 1
Jeff Gorman asked on 01 Jun 2010, 04:46 AM
i'm not sure if I'm missing something here or not, but how do I center a RadDataPager???  It seems to always want to align to the left.  Below is the RadDataPager code I'm using.


        <center> 
            <telerik:RadDataPager EnableEmbeddedBaseStylesheet="False" ID="RadDataPager2" runat="server"  
                PagedControlID="RadListView1"
                <Fields> 
                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
                    <telerik:RadDataPagerButtonField FieldType="Numeric" /> 
                    <telerik:RadDataPagerButtonField FieldType="NextLast" /> 
                </Fields> 
            </telerik:RadDataPager> 
        </center> 
 

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 01 Jun 2010, 11:28 AM
Hello Jeff,

As you may know paging elements of RadDataPager have float:left set by default. Therefore in order to "push" them you should consider setting padding to the pager container element. Similar to the following:

<style type="text/css">
     div.RadDataPager
     {
         padding-left:30%;
     
 </style>

All the best,
Rosen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeff Gorman
Top achievements
Rank 1
answered on 01 Jun 2010, 01:37 PM
That would work if the DataPager was a fixed width, but the width varies based on the number of pages.
0
BaiH
Top achievements
Rank 1
answered on 03 Jun 2010, 04:15 PM
I'm using similar approach too. I have just modified the padding value according to the layout.
I don't think currently there is another solution... maybe a custom skin. If you find one please post it here.

--BH

0
Nicolas Fahr
Top achievements
Rank 1
answered on 22 Mar 2012, 08:39 PM
this might be anothersolution:

div.RadDataPager
{
    float: left;
    left: 50%;
    position: relative;
    background: none;
    border: 0px solid #888;
}
div.RadDataPager .rdpWrap
{
    right: 50%;
    position: relative;
    background-color: yellow;
    height: 30px;
}
div.RadDataPager .rdpWrap input, div.RadDataPager .rdpWrap a
{
    margin-top: 4px !important;
}
Tags
ListView
Asked by
Jeff Gorman
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jeff Gorman
Top achievements
Rank 1
BaiH
Top achievements
Rank 1
Nicolas Fahr
Top achievements
Rank 1
Share this question
or