|
-
Sep 14th, 2009, 08:07 AM
#1
Thread Starter
Addicted Member
[RESOLVED] binding navigator to binding source to linq-to-sql
ok so this has been a solid week at least of frustration with implementing any kind of cancel changes with this combo.
- CancelEdit on the bindingsource only seems to work on things like textboxes, and specifically not on comboboxes in drop down mode.
- there's no cancelChanges on a linq to sql object.
- disposing your datacontext and refreshing it would throw away your local cache of objects, and/or orphan them from being able to traverse their foreign key properties right?
linq to sql is just too much damn better than having strings in your code, or having to provide a special data adapter for every possible query combination for strongly typed datasets.
But I can't find a decent way to implement allowing a user to save changes or cancel them whether I try to do it at the record level, or allowing a user to change lots of records and only then choosing to save. My concern for allowing the user to change multiple records would be that one change is rejected, blocking any of the changes from working, and the exception doesn't provide which control, or which record the error is on, so I have NOTHING to show the user to help them fix the problem.
I built a buffering system so that every change that is made is made to a business object. but it seemed like a crapload of code just to achieve rollback functionality that a dataset already had natively. Maybe to use linq to sql this way you have to use a stupid dataset on top of your linq to sql to get reject changes capability? I'm just not finding the way this is supposed to work.
Any knowledge or ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|