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

[Solved] Paging Issue

2 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt Russell
Top achievements
Rank 1
Matt Russell asked on 17 Aug 2009, 02:59 PM
Hello,

I have a RadGrid inside of a RadAjaxPanel which is inside of a asp:Content control using master pages. Very basic page with the grid getting populated from an EntityDataSource. I have AllowPaging enabled on the grid. When the grid first loads (it has 2 pages), if I try to click on Next Page or Last Page, nothing happens. If I actually click the numeric "2" it will take me to the second page. If I go back to the first page and try the Next Page or Last Page buttons, they suddenly begin working. Its as if I must go to another page first before the paging buttons work.

Any thoughts?

Code:
<telerik:RadAjaxPanel ID="Ajax" runat="server">
        <telerik:RadGrid ID="PageGrid" runat="server" EnableViewState="false" DataSourceID="PagesDS"
            GridLines="None" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true"
            AllowFilteringByColumn="true" PagerStyle-AlwaysVisible="true">
            <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" />
            <MasterTableView DataSourceID="PagesDS" ClientDataKeyNames="ID" AllowNaturalSort="false">
                <Columns>
                    <telerik:GridBoundColumn DataField="Word" HeaderText="Word"
                        SortExpression="Word" UniqueName="Word" ItemStyle-Wrap="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Definition" HeaderText="Definition"
                        SortExpression="Definition" UniqueName="Definition">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
    <br /><br />
    <asp:EntityDataSource ID="PagesDS" runat="server"
        ConnectionString="name=BeST_Entities" DefaultContainerName="Database"
        EntitySetName="Terms"
        Select="it.[ID], it.[Word], it.[Definition]">
    </asp:EntityDataSource>

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Aug 2009, 04:03 PM
Hi Matt,

The grid ViewState is disabled - please turn it on if you want to avoid such problems.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Matt Russell
Top achievements
Rank 1
answered on 17 Aug 2009, 04:14 PM
That worked. Thank you.
Tags
Grid
Asked by
Matt Russell
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Matt Russell
Top achievements
Rank 1
Share this question
or