Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Databinding Issue
Message
From
24/11/2010 10:47:01
 
 
To
23/11/2010 19:42:13
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01489807
Message ID:
01490379
Views:
44
>After fiddling with this for a while, I tried the endedit and it worked.
>acceptchanges also works.
>
>Thanks for pointing me at it, Bonnie.
>
>
>Is there any functional difference between the two?
>The doc implies that the datasource will be updated. That's not happening, and I don't want it to.
>
>Under what circumstances would endedit cause the datasource to be updated?


In this case, "datasource" does NOT mean your backend database... it means your DataSet/DataTable/DataRow.

.EndEdit() and .AcceptChanges() are quite different! If you issue an .AcceptChanges() what happens is that any changes are no longer "marked" as changes in the DataSet/DataTable. So if you then want to update your backend database, you won't know what changed. .EndEdit() deals with DataRows that have a DataRowVersion of Proposed. Here's a good explanation of the row versions and the use of .EndEdit():

http://geek-goddess-bonnie.blogspot.com/2009/09/fun-with-datasets.html

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform