PageSize

3 posts, 0 answers
  1. Issac
    Issac avatar
    21 posts
    Member since:
    Mar 2012

    Posted 18 Apr 2012 Link to this post

    When setting PageSize in code behind, pager will not navigate past page 1.


    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dataPager As RadDataPager = DirectCast(lstProduct.FindControl("RadPager1"), RadDataPager)
        dataPager.PageSize = 36

    <telerik:RadDataPager ID="RadPager1" AllowSEOPaging="true" SEOPagingQueryPageKey="page"  skin="Office2010Silver"
                                                                runat="server" PagedControlID="lstProduct" >
                                                                <Fields>
                                                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                                    <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="7"/>
                                                                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                                    <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="<%# IIF(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>

  2. Issac
    Issac avatar
    21 posts
    Member since:
    Mar 2012

    Posted 19 Apr 2012 Link to this post

    Tried using the Page Size Field, I can navigate past page 1, but the page size does not work.
    Also, once I use AllowSEOPaging="true" Visual studio shows "There was an error rendering the control. Request is not available in the context" 


    <telerik:RadListView ID="lstProduct" Width="80%" EnableEmbeddedSkins="false" AllowPaging="True"
        runat="server" ItemPlaceholderID="ProductsHolder">
        <LayoutTemplate>
            <div align="center">
                <fieldset style="width: 100%; border-width: 0px; text-align: center;" id="FieldSet1">
                    <asp:Panel ID="ProductsHolder" runat="server" />
                    <table cellpadding="0" cellspacing="0" width="97%" style="clear: both;">
                        <tr>
                            <td>
                                <telerik:RadDataPager ID="RadPager1" AllowSEOPaging="true" SEOPagingQueryPageKey="page"
                                    Skin="Office2010Silver" runat="server" PagedControlID="lstProduct" PageSize="36">
                                    <Fields>
                                        <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="7" />
                                        <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                        <telerik:RadDataPagerTemplatePageField>
                                            <PagerTemplate>
                                                <div style="float: right">
                                                    <b>Page
                                                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.CurrentPageIndex + 1%>" />
                                                        of
                                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.PageCount%>" />
                                                        <br />
                                                    </b>
                                                </div>
                                            </PagerTemplate>
                                        </telerik:RadDataPagerTemplatePageField>
                                        <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                    </Fields>
                                </telerik:RadDataPager>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </LayoutTemplate>
        <ItemTemplate>
            <div style="float: left;">
                <%# showimage(Container.DataItemIndex)%>
            </div>
        </ItemTemplate>
    </telerik:RadListView>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 Apr 2012 Link to this post

    Hi Issac,

    Please review the answer provided in the support ticket you have opened for the presented issue. I would suggest you to continue our communication in is due to better tracking the problem.

    Regards,
    Maria Ilieva
    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