CMS Repeater pagination not showing up

stan zhen asked on May 11, 2018 20:47

Hello,

I have a CMS repeater inside an update panel on my asp.net webforms front end code that gets populated from a webservice call that grabs data from my database. I've set EnablePaging="true" but the pagination just doesn't show up at all. I've tried setting page size and also the PagerControl-PagingMode to postback but to no avail.

Here's a sample of what I have:

<cms:CMSRepeater runat="server" ID="repeaterTest" OnItemCreated="ItemCreated" OnItemCommand="repeaterItemCommand" ItemType="WebServiceClient.Service.Data" EnablePaging="true" PageSize="25">
    <HeaderTemplate>
        <table>
            <thead>
                <tr>
                    <th>some header</th>
                    <th>some header2</th>
                </tr>
            </thead>
            <tbody>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
            <td><%# Item.ID #></td>
            <td><%# Item.FirstName #></td>
        </tr>
    </ItemTemplate>  
    <FooterTemplate>
        </tbody></table>
    </FooterTemplate>
</cms:CMSRepeater>

Code behind:

protected void Page_Load(object sender, EventArgs e) {
    BindRepeater();
}

private void BindRepeater() {
    var allData = // call to web service;

    repeaterTest.DataSource = allData;
    repeaterTest.DataBind();
}

Any help would be appreciated to get this rolling.

Recent Answers


Brenden Kehren answered on May 13, 2018 21:41

To haven't defined your pager templates. Better off setting everything in code behind if you're not using the standard webpart.

0 votesVote for this answer Mark as a Correct answer

stan zhen answered on May 14, 2018 07:16

Is the pager template the unipager control? I thought if we enabled paging on the cms:Repeater it doesn't need to be set? None of the examples on Kentico documentation has a pager template as well?

0 votesVote for this answer Mark as a Correct answer

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