Pager Not Showing

3 posts, 0 answers
  1. Rick
    Rick avatar
    58 posts
    Member since:
    Dec 2006

    Posted 30 Apr 2010 Link to this post

    I have a search that I know return 2 records (I change the page size to 2 and I get both records.)  So to test the paging I set the page size to 1  I get no pager controls at all.

    The Data is bound in the Page_Load method based on some search logic.

    I ripped the logic right from the demo.

    <telerik:RadListView ID="lvSearchResults" runat="server" AllowPaging="true" 
                                PageSize="1" ItemPlaceholderID="coursePlaceHolder" DataKeyNames="courseId"
                <LayoutTemplate> 
                    <fieldset id="FieldSet1"
                        <asp:PlaceHolder ID="coursePlaceHolder" runat='server'
                        <asp:LinkButton runat="server" ID="btnFirst" CommandName="Page" CommandArgument="First" 
                        Text="First" Enabled="<%#Container.CurrentPageIndex > 0 %>" CssClass="small green awesome" /> 
                        <asp:LinkButton runat="server" ID="btnPrev" CommandName="Page" CommandArgument="Prev" 
                        Text="Prev" Enabled="<%#Container.CurrentPageIndex > 0 %>" CssClass="small green awesome" /> 
                        <asp:Button runat="server" ID="btnNext" CommandName="Page" CommandArgument="Next" Text="Next"  
                        Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CssClass="small green awesome" /> 
                        <asp:Button runat="server" ID="btnLast" CommandName="Page" CommandArgument="Last" Text="Last"  
                        Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CssClass="small green awesome" /> 
                        </asp:PlaceHolder> 
                    </fieldset> 
                </LayoutTemplate> 
                <ItemTemplate> 
                    <div class="searchResult odd"
                        <href='/Courses/<%# Eval("courseID") %>' class="normal" ><%# Eval("courseName") %></a
                    </div> 
                </ItemTemplate> 
                <AlternatingItemTemplate> 
                    <div class="searchResult even"
                         <href='/Courses/<%# Eval("courseID") %>' class="normal"><%# Eval("courseName") %></a
                    </div> 
                </AlternatingItemTemplate>  
                 
             </telerik:RadListView>



  2. Rick
    Rick avatar
    58 posts
    Member since:
    Dec 2006

    Posted 01 May 2010 Link to this post

    I figured out what I was doing wrong, I had the page inside the placeholder, so it was getting replaced with the links.

    However now I have a new issue.  It is now not paging.

    I click on next and I get nothing, I get no results.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 03 May 2010 Link to this post

    Hi,

    Can you verify that you are not databinding the RadListView on every postback. Please note that in order to use codeless paging functionality you should use either advanced databinding or declarative databinding.

    Regards,
    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.
Back to Top