What is the proper way to bind data to RadGrid via the ADO.NET Entity Framework?
For example, something like...
... will fail because the context has been disposed before the grid actually evaluates the LINQ query.
For example, something like...
protected void radGrid_NeedDataSource( object source, GridNeedDataSourceEventArgs e ) |
{ |
using( EntityContext c = new EntityContext() ) |
{ |
var query = from x in context.Topics |
select new |
{ |
field = x.foo |
} |
radGrid.DataSource = query; |
} |
} |
... will fail because the context has been disposed before the grid actually evaluates the LINQ query.