Unable to Set RadDataPager current index exists in RadListView using Javascript

2 posts, 0 answers
  1. Phani
    Phani avatar
    10 posts
    Member since:
    Mar 2015

    Posted 24 Aug 2015 Link to this post

    Dear Team,


    I'm using RadDataPager inside a ListView. I need to reset the current page index to 1 in one specific scenario using javascript.


    I'm using the below javascript code to reset the grid. but it is unable to find the DataPager Control. Please help on achieving the required functionality. 

    var gridImages = $find("#<%=RadDataPagerLibraryVideos.ClientID %>");



    <telerik:RadListView CssClass="thumbnail" AllowPaging="true" ItemPlaceholderID="VideosHolder" runat="server" ID="LibraryVideoListView" DataKeyNames="AssetID" OnNeedDataSource="LibraryVideoListView_NeedDataSource" OnItemDataBound="LibraryVideoListView_ItemDataBound">
                                         <fieldset id="LibraryVideoListView">
                                      <telerik:RadDataPager ID="RadDataPagerLibraryVideos" runat="server" PagedControlID="LibraryVideoListView"
                                          PageSize="15" OnPageIndexChanged="RadDataPagerLibraryVideos_PageIndexChanged">
                                              <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" />
                                                      <div style="float: right">
                                                                  <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                  <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.StartRowIndex+Container.Owner.PageSize %>" />
                                                                  <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                              <br />
                                  <div class="horizontal-list center-block">
                                      <asp:Panel ID="VideosHolder" runat="server" />
                                  <div class="imgLibraryItem">
                                      <a href="#" class="videoSelected thumbnail has-hover" assetid='<%# Eval("AssetID") %>'>
                                          <asp:Image runat="server" ID="imgVideoThumbnail" CssClass="libraryImg" />


    Thanks in Advance,


  2. Eyup
    Eyup avatar
    3646 posts

    Posted 24 Aug 2015 Link to this post

    Hi Phani,

    You can use the fireCommand method provided by the RadListView to achieve this requirement:

    Hope this helps. Please give it a try and let me know if it works for you.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top