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

Forums / Developing with Sitefinity / Image Gallery Control Pager numbers display problem

Image Gallery Control Pager numbers display problem

2 posts, 0 answered
  1. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    23 Dec 2011
    Link to this post
    Hi,

    I have a custom user control that has an Image Gallery Control, that in turn uses its own custom template.
    The problem is that while the paging functionality actually works fine, the page numbers don't change. The pager displays the right number of pages with page #1 highlighted but when I click on next, page #2 does not get highlighted, even though the items displayed in the list show the next items.

    I am using Sitefinity 3.7 SP4. Any help would be highly appreciated.

    Here is my code for the image control:
    <sfLib:ImageGallery ID="telerikImages" runat="server" SortExpression="StartDate DESC" ThumbnailMaxSize="70" ReturnUrlPersistance="None" ItemListTemplatePath="~/Sitefinity/ControlTemplates/MediaKit/ItemListView.ascx" SingleItemUrl="/mediakit/ItemDetails.aspx" ItemsPerPage="12" AllowPaging="true" />
     And this is the template it uses:
    <asp:Repeater ID="repeater" runat="server">
        <HeaderTemplate><ul class="MKimagesList"></HeaderTemplate>
        <ItemTemplate>
            <li>
                    <asp:HyperLink ID="DownloadLink" runat="server" CssClass="MKimage" />
                    <asp:HyperLink ID="Title" runat="server" CssClass="title" />
            </li>
        </ItemTemplate>
        <FooterTemplate><br class="clear" /></ul></FooterTemplate>
    </asp:Repeater>
     
    <telerik:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="MKimagesPager">
                    <li class="MK_prevPage"><asp:LinkButton ID="PreviousPage" runat="server"><img src="/App_Themes/Rogers/images/btn-prev.gif" alt="Previous Page" /></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li class="MK_nextPage"><asp:LinkButton ID="NextPage" runat="server"><img src="/App_Themes/Rogers/images/btn-next.gif" alt="Next Page" /></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="Previous Page"><span>Previous Page</span></asp:HyperLink></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:HyperLink ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="Next Page"><span>Next Page</span></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
        </LayoutTemplate>
    </telerik:Pager>
    Thanks,
    Nidhi
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    28 Dec 2011
    Link to this post
    Hello,

     Can you check if the View State of the page is turned on? This is a very common problem when the View State is turned off.

    All the best,
    Svetoslav Petsov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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