1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Showing Last Page in pager control

Showing Last Page in pager control

2 posts, 0 answered
  1. Gökhan Yalçın
    Gökhan Yalçın avatar
    21 posts
    Registered:
    26 Nov 2009
    17 Apr 2010
    Link to this post
    Hi ,

    How can I enable Last Page button in this control ?

    <sfMsg:Pager runat="server" ID="pager1">
                   <LayoutTemplate>
                       <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                           <HeaderTemplate>
                               <ol class="pager">
                                   <li>
                                       <asp:LinkButton ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:LinkButton></li>
                           </HeaderTemplate>
                           <ItemTemplate>
                               <li>
                                   <asp:LinkButton ID="SingleItem" runat="server" />
                               </li>
                           </ItemTemplate>
                           <FooterTemplate>
                               <li>
                                   <asp:LinkButton ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:LinkButton></li>
                               </ol>
                           </FooterTemplate>
                       </asp:Repeater>
                       <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                           <HeaderTemplate>
                               <ol class="sf_pager">
                                   <li>
                                       <asp:HyperLink ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:HyperLink></li>
                           </HeaderTemplate>
                           <ItemTemplate>
                               <li>
                                   <asp:HyperLink ID="SingleItem" runat="server" />
                               </li>
                           </ItemTemplate>
                           <FooterTemplate>
                               <li>
                                   <asp:HyperLink ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:HyperLink></li>
                               </ol>
                           </FooterTemplate>
                       </asp:Repeater>
                   </LayoutTemplate>
               </sfMsg:Pager>

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Apr 2010
    Link to this post
    Hi Gökhan Yalçın,

    The supported commands are

    •  "JumpPage"
    • "PreviousPage"
    • "NextPage"

    The control does not support option for moving directly to the last page. You will need to override the CreateChildControls of   Telerik.Cms.Web.UI.Pager and access the DataSource of this.Container.PageRepeaterHyperLink or this.Container.PagerRepeaterLinkButton;Then you can get the last page from the datasource object and assign the proper value to the custom link button that you have to add. Finally you need to use your custom control instead of the built-in pager.

    Regards,
    Ivan Dimitrov
    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.
2 posts, 0 answered