Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 6-Sep-12 2:41am
Comments
Sandeep Mewara at 6-Sep-12 12:25pm
   
It would be more helpful if you share the full error.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 345
1 Gihan Liyanage 332
2 OriginalGriff 283
3 ClimerChinna 222
4 Zoltán Zörgő 170
0 Sergey Alexandrovich Kryukov 8,243
1 OriginalGriff 7,109
2 CPallini 2,598
3 Richard MacCutchan 1,980
4 Abhinav S 1,778


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100