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

Data editing with Entity Framework

3 Answers 143 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mauricio
Top achievements
Rank 1
Mauricio asked on 20 Aug 2008, 12:56 AM
Hi, I'm having some problems when trying to insert/edit data using entity framework and telerik. Lets see 3 cases:

1) using an entity very simple without foreign keys:  the operations works fine
2) an entity with foreign keys: the edit operation works, but insert causes a 'null reference' error in InitInsert
3) an child entity:  only display data works, both editing and inserting don't works.

I've tried using EntityDataSource and direct binding using linq as source of data, but without success.

Do you have some example using entity framework?

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 25 Aug 2008, 02:42 PM
Hello Mauricio,

Please find the attached project.
It seems to me that insert/delete/update operation with RadGrid and EntityDataSource are working as expected.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rob Howarth
Top achievements
Rank 1
answered on 18 Nov 2008, 08:18 AM
The sample code seems to work for updates and deletes, but I have an issue with inserts.  My grid is actually displaying the results of a many-to-many relationship in the entity model.  The insert command seems to have no effect whatsoever.  Can you point me to a more appropriate example?

-Rob H
0
Nikolay Rusev
Telerik team
answered on 20 Nov 2008, 02:48 PM
Hello Rob,

Attached to this post you can find another example of RadGrid bound via EntityDataSource control and have all operations insert/update/delete.

If you have any other issues with implementing this functionality on your end I suggest you to open a formal support ticket and send us small project which replicates the issue. Thus we'll be able to debug it locally and help you more on this.

I hope this was helpful.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Mauricio
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Rob Howarth
Top achievements
Rank 1
Share this question
or