Click here to Skip to main content
15,886,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear All,

I want to remove a record from a datagridview which is bound to a linq to sql query.
There are two grids, one for master data and other for details entry. The linq tables maintain relationships.

The problem is occuring in details grid.
When the row is saved, I have no problem in deleting the row. Calling db.SubmitChanges() removes the rows. But when user enters a new record and decides to cancel his changes, I get an error "An attempt was made to remove relationship between ......" Is there a way of getting out of this problem.

Thank you
Posted
Comments
Sandeep Mewara 6-Sep-12 12:25pm    
It would be more helpful if you share the full error.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900