Access Edit Mode Values of BindingSource Control

Posted by Christopher Edwards on Stack Overflow See other posts from Stack Overflow or by Christopher Edwards
Published on 2008-10-29T13:19:47Z Indexed on 2010/03/14 16:45 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

I have a BindingSource control (http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.aspx) with a datasource of a (single) Linq object. If I change any of the properties of the underlying Linq-to-Sql object then all the other changes on the bound controls on the form are lost.

Does anyone now why and how I work around it? I don't want to call EndEdit because this will commit the changes to the underlying object. I think this might be because my underlying object linq-to-sql object does not implement IEditableObject so the potental new values for the object fields are sort of stored in the forms controls.

Can anyone either clarify what is going on and/or suggest a work around.

Thanks!

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms