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

RadDataPager Align Right

2 Answers 26 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Angie
Top achievements
Rank 1
Angie asked on 27 Aug 2012, 07:39 PM
Hello.  I am trying to have my "displaying 1 of 10" element of the RadDataPager float all the way to the right.  It doesn't seem proper to use hardcoded padding when the width of the page numbers can vary.  Is there a good solution to this?  Thanks!  :-)

Code:
<LayoutTemplate>
           <telerik:    ID="RadDataPagerTop"  runat="server" IsTotalItemCountFixed="True" Skin="Windows7" Width="752px"  CssClass="Custom">
                       <Fields>
                           <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                           <telerik:RadDataPagerButtonField FieldType="Numeric" />
                           <telerik:RadDataPagerButtonField FieldType="NextLast" />
                           <telerik:RadDataPagerTemplatePageField>
           <PagerTemplate>
               <div style="float: right">
                   Displaying items
                       <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex + 1 %>" />
                       to
                       <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# (Container.Owner.TotalRowCount < Container.Owner.StartRowIndex + Container.Owner.PageSize)?Container.Owner.TotalRowCount:Container.Owner.StartRowIndex + Container.Owner.PageSize  %>" />
                       of
                       <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount %>" />
                   
               </div>
           </PagerTemplate>
       </telerik:RadDataPagerTemplatePageField>
 
                   </Fields>        
                   </telerik:RadDataPager>

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 30 Aug 2012, 08:56 AM
Hi Angie,

Could you please try the following approach and let me know about the result?
<telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">

That should do the trick.

All the best,
Eyup
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
Angie
Top achievements
Rank 1
answered on 30 Aug 2012, 03:34 PM
Awesome!  That worked like a charm!  Thank you!
Tags
ListView
Asked by
Angie
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Angie
Top achievements
Rank 1
Share this question
or