RadListView with RadDataPager and Setting SEO Paging True

2 posts, 0 answers
  1. elais
    elais avatar
    8 posts
    Member since:
    Jun 2010

    Posted 28 Jun 2010 Link to this post

    I am working on a page having Rad List View and RadDataPager. I am using Rad Ajax manager and Rad Ajax Loading Panel to display loading image when navigating between pages.
    Everything is functioning well until I am setting the AllowSEOPaging="true" in the Data Pager. When I set AllowSEOPaging="true" and SEOPagingQueryPageKey="Page" the data pager display appearance is wrong and the loading image is not appearing.
    Whenever there is a post back IsPostBack Value is always false and this is a weird thing.

     <form id="form1" runat="server">
        <div>
             <asp:ScriptManager ID="Teets" runat="server">
            </asp:ScriptManager>
           <%-- <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />--%>
            <telerik:RadAjaxManager ID="radAjaxManager" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0"
                EnableSkinTransparency="true" Transparency="50">
                <%--<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/ajax-loader.gif" AlternateText="loading" />--%>
                <table style="height: 100%; width: 900px" border="0">
                    <tr>
                        <td width="900px" align="center" valign="middle">
                            <img src="Images/ajax-loader.gif" alt="" style="border: 0px;" />
                        </td>
                    </tr>
                </table>
            </telerik:RadAjaxLoadingPanel>
            <asp:Panel ID="ListViewPanel1" runat="server">
                <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="true" runat="server"
                    ItemPlaceholderID="ProductsHolder" OnPageIndexChanged="RadListView1_PageIndexChanged"
                    DataKeyNames="id_product" OnNeedDataSource="RadListView1_NeedDataSource">
                    <LayoutTemplate>
                        <fieldset style="width: 900px;" id="FieldSet1">
                            <legend>Products</legend>
                            <asp:Panel ID="ProductsHolder" runat="server" />
                            <table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
                                <tr>
                                    <td>
                                        <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1" Skin="Outlook"
                                            PageSize="7" SEOPagingQueryPageKey="xyz" AllowSEOPaging="true">
                                            <Fields>
                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                                <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                                    TextBoxWidth="15" />
                                                <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>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div style="float: left;">
                            <table cellpadding="0" cellspacing="0" style="width: 230px; height: 100px">
                                <tr>
                                    <td style="width: 20%;">
                                        Name:
                                    </td>
                                    <td style="width: 80%; padding-left: 5px;">
                                        <%# Eval("productName") %>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Alias:
                                    </td>
                                    <td style="width: 80%; padding-left: 5px;">
                                        <%# Eval("productAlias")%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <hr />
                                    </td>
                                    <td>
                                        <hr />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ItemTemplate>
                </telerik:RadListView>
            </asp:Panel>
        </div>
        </form>
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 28 Jun 2010 Link to this post

    Hello Elais,

    Actually this is expected behavior when SEOPaging is enabled. As you may know this option is designed to work for Web crawler and it will be enabled automatically if such is accessing the page. Thus the pager it will generate links instead buttons which will make GET instead POST requests. 

    Greetings,
    Rosen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top