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

Custom EntityDataSource

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Damien
Top achievements
Rank 1
Damien asked on 07 Mar 2014, 09:28 AM
Hello,

I am using EF6 and the new EntityDataSource (Microsoft.AspNet.EntityDataSource) with Telerik.Web.UI v2014.1.225.40.
Since I have many views using EntityDataSource, I derived a subclass from EntityDataSource where ConnectionString, DefaultContainerName, ContextCreating, ContextDisposing are set, so I do not have to do this every time I use an EntityDataSource.

However this causes trouble with the RadGrid e.g. when writing. (I get the same errors as here.)
As I realized in this post and later through reflecting, the RadGrid (GridTableView) checks against a hard-coded list of data source views. I thought I could just derive a subclass of RadGrid, GridTableView. While I could override GridTableView.CreateDataSourceSelectArguments which contains some of those hard-coded views, I realized that there are some non-virtual methods that contain the hard-coded checks:GridTableView.IsDataSourceViewWithFiltering and GridTableView.IsEntityDataSourceView. (Are these all or is this an issue in other Telerik controls too?)

Maybe you could reorganize this to make my use case possible.
I propose to reuse IsEntityDataSourceView in CreateDataSourceSelectArguments and IsDataSourceViewWithFiltering so one does not need to override it (and DRY principle) and make IsEntityDataSourceView virtual.

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 11 Mar 2014, 09:40 AM
Hi Damien,

Thank you for the valuable feedback. I will forward the proposed improvements to our developers for further consideration.

If you need further assistance, do not hesitate to contact us again.

Regards,
Radoslav
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
Grid
Asked by
Damien
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or