Repeater and unipager

prathap myl asked on May 28, 2014 07:17

This is my code. I am trying to display custom table items with paging option. the code display the custom table records but not the paging. the paging does not appear.

<cms:CMSUpdatePanel runat="server" ID="organisationUpdatePanel">

Recent Answers


prathap myl answered on May 28, 2014 07:25

Sorry, i added the whole source code but the it takes only few lines for the question.

0 votesVote for this answer Mark as a Correct answer

prathap myl answered on May 28, 2014 07:28

The server side code to bind the repeater with dataset.

        string customTableClassName = "ct.OrganisationsAndVenues";

        DataClassInfo customTable = DataClassInfoProvider.GetDataClassInfo(customTableClassName);
        if (customTable != null)
        {
            DataSet customTableItems = CustomTableItemProvider.GetItems(customTableClassName);
            if (!DataHelper.DataSourceIsEmpty(customTableItems))
            {
                rptOrganisationInfo.DataSource = customTableItems;
                rptOrganisationInfo.DataBind();
            }
        }
0 votesVote for this answer Mark as a Correct answer

prathap myl answered on May 28, 2014 07:31

This is my code. I am trying to display custom table items with paging option. the code display the custom table records but not the paging. the paging does not appear.

<cms:CMSUpdatePanel runat="server" ID="organisationUpdatePanel">
            <ContentTemplate>
                <cms:UniPager ID="UniPager2" runat="server" PageControl="rptOrganisationInfo" GroupSize="10">
                    <PageNumbersTemplate>
                        <a href="<%# Eval("PageURL") %>"><%# Eval("Page") %></a>
                    </PageNumbersTemplate>
                </cms:UniPager>
                <div class="row">
                    <cms:CMSRepeater ID="rptOrganisationInfo" runat="server" DelayedLoading="true" DataBindByDefault="false"
                        EnablePaging="true" >
                        <ItemTemplate>
                            <div class="dir">
                                <div class="col-sm-12">
                                    <h1>Organisation name</h1>
                                    <h3><%#Eval("ItemName")%></h3>
                                </div>
                                <div class="col-sm-4">
                                    <address>
                                        <span>Address</span><br>
                                        <%#Eval("ItemAddressLine1")%>
                                    </address>
                                </div>
                                <div class="col-sm-5">
                                    <address>
                                        <span>Contact details</span><br>
                                        <abbr title="Telephone number">Tel:</abbr>02380 490 511<br>
                                        <abbr title="Fax number">Fax:</abbr>02380 490 511<br>
                                        <abbr title="E-mail">E-mail:</abbr><a href="mailto:#">keith@harefieldmarshes.wanadoo.co.uk</a><br>
                                        <a href="#">www.harefieldmarshes.wanadoo.co.uk</a>
                                    </address>
                                </div>
                                <div class="col-sm-3">
                                    <address>
                                        <span>Operational Times</span><br>
                                        Parade evenings Tuesday &amp; Thursday 7.30 to 9.30pm

                                    </address>
                                </div>
                                <div class="col-sm-12">
                                    <span>Description</span>
                                    <p>The purpose of scouting is to promote the development of young people in achieving their potential - full physical, intellectual, social and spiritual - as individuals, as responsible citizens and as members of their local national and international communities.</p>
                                    <hr>
                                </div>
                            </div>
                        </ItemTemplate>
                    </cms:CMSRepeater>
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="UniPager2" />
            </Triggers>
        </cms:CMSUpdatePanel>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.