IeditableObject on dataform

0 Answers 57 Views
DataForm EntityFrameworkCoreDataSource (.Net Core)
Sami
Top achievements
Rank 2
Iron
Iron
Iron
Sami asked on 17 Nov 2022, 11:12 PM

HI:

I read the documentation about cancel option, and all that I saw says that you should implement interface IEditableObject.  I have a project that doesn't implement it and cancel button works perfectly over observable collection against entity framework throw CollectionViewSource:


            ICollectionView c = CollectionViewSource.GetDefaultView(db.Clientes.FromSqlRaw("Select * From CLIENTES ").ToList());
            dbGrid.ItemsSource = c;
            dataForm.ItemsSource = c;

 

in other project with other table it doesnt work unless my object implments IEditableObject, ¿Why?

Is necesary implement IEditableObject incluiding if use EnityFramework over observable collection? Is necesary implment this IedtiableObject interfase also if I use RadEntityFrameworkCoreDataSource instead  ICollectionView ?

 

Thanks in advance for your dvise.

 

Stenly
Telerik team
commented on 22 Nov 2022, 02:30 PM

Hello Sami,

The Cancel option of the RadDataForm control would require the items of the data source to implement either the IEditableObject or the INotifyPropertyChanged interfaces. My guess is that since the Cancel option works without having implemented the IEditableObject interface, is that the INotifyPropertyChanged interface is implemented instead. Or the class, which represents the items of the data source derives from a class that implements the INotifyPropertyChanged or IEditableObject interfaces.

I am not sure that I understand the question regarding the RadEntityFrameworkCoreDataSource class and the ICollectionView interface.

With this being said, would it be possible to double-check if this is the reason in on your end?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

No answers yet. Maybe you can help?

Tags
DataForm EntityFrameworkCoreDataSource (.Net Core)
Asked by
Sami
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or