This is a migrated thread and some comments may be shown as answers.

Pager Not Showing

2 Answers 41 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 01 May 2010, 02:59 AM
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 Answers, 1 is accepted

Sort by
0
Rick
Top achievements
Rank 1
answered on 01 May 2010, 12:50 PM
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.
0
Rosen
Telerik team
answered on 03 May 2010, 12:14 PM
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.
Tags
ListView
Asked by
Rick
Top achievements
Rank 1
Answers by
Rick
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or