This is a migrated thread and some comments may be shown as answers.

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

1 Answer 73 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Xavier Hutchinson
Top achievements
Rank 2
Xavier Hutchinson asked on 10 May 2012, 02:34 AM
HI,

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.

Thanks,

Xavier.

<telerik:RadListView ID="rlvStaffNotes" ViewStateMode="Enabled" AllowPaging="True" runat="server" CssClass="ui-staffnote-container" ItemPlaceholderID="staffNotesPlaceHolder"
                            OnNeedDataSource="rlvStaffNotes_NeedDataSource">
                                <LayoutTemplate>
                                    <fieldset>
                                        <asp:Panel ID="staffNotesPlaceHolder" runat="server" />
                                        <telerik:RadDataPager ID="rpgrStaffNotes" runat="server" AllowSorting="true" PagedControlID="rlvStaffNotes" PageSize="5" ViewStateMode="Enabled">
                                            <Fields>
                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                                <telerik:RadDataPagerTemplatePageField>
                                                    <PagerTemplate>
                                                        <div style="float: right">
                                                            <b>
                                                                Items
                                                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                to
                                                                <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 %>" />
                                                                of
                                                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                <br />
                                                            </b>
                                                        </div>
                                                    </PagerTemplate>
                                                </telerik:RadDataPagerTemplatePageField>
                                            </Fields>
                                        </telerik:RadDataPager>
                                    </fieldset>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <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>
                                            <span class="ui-staffnote-type">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Type")%>' />
                                            </span>
                                            <span class="ui-staffnote-createdby">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CreatedBy")%>' />
                                            </span>
                                        </div>
                                        <div style="clear:both; position:relative;">
                                            <span class="ui-staffnote-title">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title").ToString().Trim()%>' />
                                            </span
                                            <span class="ui-staffnote-notation">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Notation").ToString().Trim()%>' />
                                            </span>
                                        </div>
                                        <div style="clear:both; position:relative;"> </div>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadListView>

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 14 May 2012, 02:09 PM
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,
Tsvetina
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.
Tags
DataPager
Asked by
Xavier Hutchinson
Top achievements
Rank 2
Answers by
Tsvetina
Telerik team
Share this question
or