DataPager not working

6 posts, 0 answers
  1. Tonyz289
    Tonyz289  avatar
    50 posts
    Member since:
    Jun 2011

    Posted 23 Aug 2011 Link to this post

    Here is the design of my page:

    I have a TreeView; selecting a node in the view will display a ListView that is filled based on the node.

    I also have a search function that displays the ListView filled based on the results of search.

    Those functions both work correctly.

    My ListView contains a DataPager. The DataPager initializes correctly and matches the contents of the ListView.

    My problem is that I can't page. The DataPager itself is changed (page number, etc) but the ListView is static.

    RadAjaxManager section
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnRefreshTree">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                    <telerik:AjaxUpdatedControl ControlID="DescriptionText" />
                    <telerik:AjaxUpdatedControl ControlID="lblTotalAssets" />
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectAll">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnUnSelectAll">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnRefresh">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                    <telerik:AjaxUpdatedControl ControlID="lblTotalAssets" />
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadListView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                    <telerik:AjaxUpdatedControl ControlID="DescriptionText" />
                    <telerik:AjaxUpdatedControl ControlID="lblTotalAssets" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadDataPager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    ListView and DataPager section:
    <telerik:RadListView ID="RadListView1" runat="server" AllowPaging="True" ItemPlaceholderID="PlaceHolder1"
        OnItemCreated="RadListView1_ItemCreated" OnPreRender="RadListView1_PreRender"
        DataKeyNames="id">
        <LayoutTemplate>
            <div class="RadListView RadListViewFloated RadListView_Windows7">
                <telerik:RadDataPager ID="RadDataPager1" runat="server" Skin="Sitefinity" PageSize="25"
                    PagedControlID="RadListView1" BorderWidth="0">
                    <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.StartRowIndex+Container.Owner.PageSize %>" />
                                        of
                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                        <br />
                                    </b>
                                </div>
                            </PagerTemplate>
                        </telerik:RadDataPagerTemplatePageField>
                    </Fields>
                </telerik:RadDataPager>
                <div id="PlaceHolder1" runat="server" />
            </div>
        </LayoutTemplate>
        <ItemTemplate>
            <div style="float: left;">
                <fieldset style="border: 0; width: 154px; height: 154px; margin: 5px 5px 5px 5px;">
                    <div class="myClass" style="padding: 2px 2px 2px 2px; background: #eeeeee; text-align: center;">
                        <a href="javascript:Popup_Window('asset_preview','<%# Eval("id") %>')">
                            <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" AutoAdjustImageControlSize="False"
                                CssClass="myClass" ImageUrl='<%# Eval("thumbUrl") %>' ResizeMode="Fit" AlternateText="Click to view preview"
                                ToolTip="Click to view preview" Width="150px" Height="150px" />
                        </a>
                    </div>
                </fieldset>
                <div style="border: 0px; white-space: normal; width: 150px; margin: 5px 5px 5px 5px;
                    padding: 2px 2px 2px 2px;">
                    <asp:CheckBox ID="chkImage" runat="server" AutoPostBack="True" />
                    <a href="javascript:Popup_Window('asset_detail','<%# Eval("id") %>')">
                        <%# Eval("title") %>
                        -
                        <%# Eval("filenameextension") %></a>
                    <%--<asp:HyperLink ID="lnkAsset" Target="_new" NavigateUrl="assetinfo.aspx" runat="server"><%# Eval("filename") %></asp:HyperLink>--%>
                    <asp:HiddenField ID="hiddenAssetId" Value='<%# Eval("id") %>' runat="server" />
                </div>
            </div>
        </ItemTemplate>
        <EmptyDataTemplate>
            No Assets Found
        </EmptyDataTemplate>
    </telerik:RadListView>
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 26 Aug 2011 Link to this post

    Hello Tony,

    Could you please let me know if the application works correctly when the Ajax is disabled on the page.
    Also I would suggest you to review the following online demo which provides approach for using RadDataPager with RadListView.

    Greetings,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tonyz289
    Tonyz289  avatar
    50 posts
    Member since:
    Jun 2011

    Posted 26 Aug 2011 Link to this post

    Under Telerik how do I disable the Ajax is on the page.?
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 29 Aug 2011 Link to this post

    Hello Tony,

    Please set the EnableAjax property of the RadAjaxManager order to "disabled" in order to disable the Ajax on the page.

    Regards,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  6. Tonyz289
    Tonyz289  avatar
    50 posts
    Member since:
    Jun 2011

    Posted 30 Aug 2011 Link to this post

    The only thing that occurs is my ListView no longer appears. Everything else is non-working.
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 01 Sep 2011 Link to this post

    Hello Tony,

    It will be best if you open a regular support ticket and send us runnable version of your application. Thus we will be bale to debug it locally and od our best to isolate the root cause of the problem and provide proper solution for your scenario.

    Greetings,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017