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

Implementing Group By using linq in telerik

1 Answer 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pooja
Top achievements
Rank 1
pooja asked on 10 Jun 2011, 11:20 AM
Hi,

Can anyone tell how to implement Group By on datatables using linq in telerik (C# Application).
I have written query as follows:

var query = from 

 

 

dataitem in combinedDataTable.AsEnumerable()  

 

 

 

group dataitem by dataitem.Field<string>("IONumber") into r

select new  

 

 

 

{

IONumber = r.Field<

 

string>("IONumber"),
IOName = r.Field<string>("IOName")
}

I am getting error on 'group' saying:
'Telerik.Web.UI.GridDynamicQueryable.GroupBy(System.Linq.IQueryable, string, string, params object[])' is inaccessible due to its protection level

Can anyone suggest how to update this query to work fine? (I am using telerik 2009)

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 15 Jun 2011, 12:16 PM
Hello,

How do you use this query? Do you bind it to RadGrid in its NeedDataSource event? Can you send us the source code of a test page (please use  the Format Code Block feature of the editor) that we can debug locally?

Veli
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
General Discussions
Asked by
pooja
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or