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

Bind to LINQ "Select New"

1 Answer 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Peter Meinl
Top achievements
Rank 1
Peter Meinl asked on 26 Jan 2010, 12:41 PM
I am experimenting to write a generic data browser for WCF data services.

When binding to a query result created using "select new" RadGridView does not display any data: 

Dim q = From o In svc.Orders Select o 'This query displays data

Dim q = From o In svc.Orders Select New With {o.OrderDate} 'This query does not display data

RadGridView1.DataSource = q.ToList

  1. How can I use autogenerated columns with "Select New"?
  2. Can the RadGridView automatically diplay hierarchical data from LINQ queries?
    Ex: from c in Customers select new with {CustomerId, c.Orders}

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 28 Jan 2010, 01:01 PM
Hello Peter Meinl,

The current version of RadGridView does not support LINQ queries. RadGridView shows data which implements IList or IBindingList interfaces. We plan to extend RadGridView to support new data providers and LINQ queries in the future .NET 3.5 editions of our control.

Sincerely yours,
Julian Benkov
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
GridView
Asked by
Peter Meinl
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or