Last post Feb 07, 2013 06:28 AM by kerry-jiang
Apr 08, 2012 12:39 PM|kukikukac|LINK
In my page i'm using a GridView which has an Entiy Datasource and when i'm trying to update or delete a record i get this error
I don't know what i'm doing wrong or what is missing please help me.
Apr 08, 2012 12:41 PM|Ken Tucker|LINK
A table needs a primary key for the entityframe to know what records to change. Once you add the primary key right click on the entity designer and select update database
Apr 08, 2012 12:51 PM|kukikukac|LINK
The table has a primary key and it can be seen in the entity designer as well but it still does not work.
Apr 08, 2012 03:00 PM|Ken Tucker|LINK
Is the primary key a single column? If it is try right clicking on the entity framework designer and select update model. Hopefully that will fix the mappings
Apr 10, 2012 01:22 AM|Decker Dong - MSFT|LINK
Show us your model entities as well as your codes……Well，if possible，plz show us your real codes and debug you app and point out what's wrong with your codes？
Apr 10, 2012 05:10 PM|kukikukac|LINK
Hi Decker Dong !
Actually, I found out that sorting the gridview caused the problem, I used the following statement :
without this, I can update the database, however I really need to sort this GridView.
Apr 11, 2012 01:04 AM|Decker Dong - MSFT|LINK
From this statament I cannot see any things to do……But in my mind，I think if you use EntityFramework to bind to the GridView and enable CRUD，everything should be fine……So please have a try of that way。
Feb 07, 2013 06:28 AM|kerry-jiang|LINK
I have the same issue, deleting will be disabled after programming sorting.