RadDataPager Align Right

3 posts, 1 answers
  1. Angie
    Angie avatar
    101 posts
    Member since:
    Jan 2008

    Posted 27 Aug 2012 Link to this post

    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!  :-)

               <telerik:    ID="RadDataPagerTop"  runat="server" IsTotalItemCountFixed="True" Skin="Windows7" Width="752px"  CssClass="Custom">
                               <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                               <telerik:RadDataPagerButtonField FieldType="Numeric" />
                               <telerik:RadDataPagerButtonField FieldType="NextLast" />
                   <div style="float: right">
                       Displaying items
                           <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex + 1 %>" />
                           <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  %>" />
                           <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount %>" />

  2. Answer
    Eyup avatar
    2942 posts

    Posted 30 Aug 2012 Link to this post

    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,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Angie
    Angie avatar
    101 posts
    Member since:
    Jan 2008

    Posted 30 Aug 2012 Link to this post

    Awesome!  That worked like a charm!  Thank you!
Back to Top