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

[Solved] Paging not working

2 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wendy Hunt
Top achievements
Rank 2
Wendy Hunt asked on 22 Dec 2009, 03:59 PM
I am using the following: VS2008, Windows XP, IE7, the latest Telerik product and C#.

I have used the Configuration Tool to set my data instead of writing backend code to do so.  
My Datasource is as follows:

 

<asp:EntityDataSource ID="EntityDataSource1" runat="server"

 

ConnectionString="name=AllDataModels" DefaultContainerName="AllDataModels"

 

 

 

EntitySetName="Project" Select="it.[Name], it.[Identifier], it.[ID]">

 

 

 

</asp:EntityDataSource>

 

 

 

 

 


I have then selected from the RadGrid Tasks from the arrow in design view -->  General Features and checked "Enable Paging".

I am getting a error on the page when paging is enabled, but when paging is not enabled... the data is generated just fine and I can see all.  When I enable paging ... I get the error again.

Here is my aspx code:

<

 

telerik:RadGrid ID="RadGrid1" runat="server"

 

style="z-index: 1; left: 9px; top: 122px; position: absolute;"

 

 

 

AllowSorting="True" DataSourceID="EntityDataSource1" GridLines="None"

 

 

 

AllowPaging="True">

 

 

 <

MasterTableView AutoGenerateColumns="False" DataSourceID="EntityDataSource1">

 

 

 

<RowIndicatorColumn>

 

 

 

<HeaderStyle Width="20px" />

 

 

 

</RowIndicatorColumn>

 

 

 

<ExpandCollapseColumn>

 

 

 

<HeaderStyle Width="20px" />

 

 

 

</ExpandCollapseColumn>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="Name" HeaderText="Name" ReadOnly="True"

 

 

 

SortExpression="Name" UniqueName="Name">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Identifier" HeaderText="Identifier"

 

 

 

ReadOnly="True" SortExpression="Identifier" UniqueName="Identifier">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"

 

 

 

ReadOnly="True" SortExpression="ID" UniqueName="ID">

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

Thanks for any help you can give.  :)

~wen

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Dec 2009, 07:40 AM
Hello Wendy,

I could not find anything wrong with your code but probably you can refer to the following online demo which demonstrates on populating grid with an EntityDataSource. The grid from the example supports paging and sorting.
Grid / Entity Framework

Thanks
Princy.

0
Daniel
Telerik team
answered on 28 Dec 2009, 03:10 PM
Hello Wendy,

I confirm there is nothing wrong in your code. If the problem still persists please attach a runnable demo and we will debug it locally. You can use the support ticket system.
Send a support ticket

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Wendy Hunt
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or