Page numbers work, but not first/back/next/last page and page size buttons

2 posts, 0 answers
  1. Xavier Hutchinson
    Xavier Hutchinson avatar
    23 posts
    Member since:
    Nov 2009

    Posted 09 May 2012 Link to this post


    I am having an issue with the pager and radlistview.

    below is my code, the problem is the First Page - Previous Page - Next Page - Last Page and Page Size controls dont work, however the direct page number buttons do.

    I have striped out the Ajax component and the problem still exists.



    <telerik:RadListView ID="rlvStaffNotes" ViewStateMode="Enabled" AllowPaging="True" runat="server" CssClass="ui-staffnote-container" ItemPlaceholderID="staffNotesPlaceHolder"
                                            <asp:Panel ID="staffNotesPlaceHolder" runat="server" />
                                            <telerik:RadDataPager ID="rpgrStaffNotes" runat="server" AllowSorting="true" PagedControlID="rlvStaffNotes" PageSize="5" ViewStateMode="Enabled">
                                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                    <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                                            <div style="float: right">
                                                                    <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.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                    <br />
                                        <div class="ui-staffnote-item">
                                            <div style="clear:both; position:relative;">
                                                <span class="ui-staffnote-created">
                                                    <asp:Label runat="server" ID="created" Text='<%# DataBinder.Eval(Container.DataItem, "Created") %>' />
                                                <span class="ui-staffnote-type">
                                                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Type")%>' />
                                                <span class="ui-staffnote-createdby">
                                                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CreatedBy")%>' />
                                            <div style="clear:both; position:relative;">
                                                <span class="ui-staffnote-title">
                                                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title").ToString().Trim()%>' />
                                                <span class="ui-staffnote-notation">
                                                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Notation").ToString().Trim()%>' />
                                            <div style="clear:both; position:relative;"> </div>
  2. Tsvetina
    Tsvetina avatar
    2481 posts

    Posted 14 May 2012 Link to this post

    Hello Xavier,

    I tried the same listview declaration (I only simplified the ItemTemplate) and it works fine on my side. You can find my test project attached to this message. Can you tell what else I need to do in order to be able to replicate the problem that you experience?

    Kind regards,
    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.
Back to Top