Hi
I am just looking at the Telerik controls as part of an evaluation for some work I will be carrying out but have come up against an error with the RadGrid control.
I have a simple linqdatasource retrieving a firstname and lastname from a contact list. I have implemented a radgrid with paging, filtering, sorting and grouping. The grid brings back the first page of results but I receive the following client side message when I try to navigate to the next page...
sys.webforms.pagerequestmanagerservererrorexception
Exception has been thrown by the target of an invocation
The grid is ajaxified, in a radmultipage that is controlled by a tabstrip.
Any ideas?
thanks
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="TelerikEvalDbDataContext"
Select="new (first_name, last_name)"
TableName="contacts">
</asp:LinqDataSource>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" DataSourceID="LinqDataSource1"
GridLines="None" ShowGroupPanel="True" Skin="Vista">
<MasterTableView DataSourceID="LinqDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</MasterTableView>
<ClientSettings AllowDragToGroup="True">
</ClientSettings>
</telerik:RadGrid>
9 Answers, 1 is accepted


Please examine the attached test project which implements the described functionality. Depending on the given information the RadMultiPage and RadTabStrip are not connected with the issue.
Best wishes,
Georgi Krustev
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.

Upgrading from sql 2000 to sql 2005 fixed this issue.
Thanks

I suggest you disable temporary the ajax in order to see the server exception generated in this case as it can shed some additional light on the reason for the issue. You may also examine the sample project provided by my colleague Georgi if you follow the same configuration schema.
Best regards,
Sebastian
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.

Error: "This provider supports skip() only over ordered queries returning entities or projections that contain all identity columns, where the query is a single-table (non-join) query or is a Distinct, Except, Insersect or Union (Not CONCAT) operation"
http://msdn.microsoft.com/en-us/library/bb386996.aspx
SOLUTION:
The problem here is that when using SQL Server 2000 and LINQ to SQL for paging (more precisely using the LINQ to SQL Skip() method), the LINQ to SQL DataContext requires that the Primary Key field be included in the query and that the DataContext Column definition have both the attributes IsPrimaryKey=true and the correct AutoSync enumeration (ie AutoSync="AutoSync.OnInsert"). Example: [Column (Storage="_ID", AutoSync="AutoSync.OnInsert", IsPrimaryKey=true, DbType="Int NOT NULL IDENTITY"....)].
I am using SQL Views and generated the DataContext by "dragging" the views onto the dbml designer. Although I have the PrimaryKey Column included in the views, the DataContext generated for the views did not automatically add the AutoSync and IsPrimaryKey attributes to the PrimaryKey columns.
Manually adding the attributes fixed the problem. Simple way was to select the column on the view in the ClassDesigner and using the properties tab set the Primary Key to true and AutoSync to appropriate enumeration (can do this in code with designer.cs manually as well).
Note that changes will be overwritten if the view is automatically regenerated again and above changes will need to be manually added again.
Thank you for sharing the solution you found in this public forum thread - thus you can help other Telerik community members who stumble upon the same problem. I updated your Telerik points for the valuable feedback.
Best regards,
Sebastian
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.

Thank you so much for your thorough and detailed response. You've saved me many hours of hair pulling!