This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Andrew, Here's another one for you - is it expected that calling CancelEdit() on an entity will clear any associated entity collections? Attached is a repro showing the observed behaviour. The app loads an entity (customer) containing an associated entity collection (contracts). Clicking the edit button puts the customer entity into edit mode - clicking the cancel button cancels the edit session, but results in the contracts collection being cleared (as observed by the bound datagrid). Thanks for your time, Greg PS. This was tested against v1.2.114.6752 |
|
|
Thanks Greg will take a look. |
|
|
Hi Andrew Can you give an indication of whether you've looked at this issue yet? Cheers, Greg |
|
|
Hi Greg, I've had a look and the issue is caused by BeginEdit being called multiple times by BindingSource. In particular, BeginEdit is called before the lazy loaded collection child properties have been populated. I'm currently working on trying to get LightSpeed to gracefully deal with this. Cheers, Andrew. |
|
|
Hi Andrew, Just want to know if you were able to resolve this problem? The Reason I'm asking is I'm getting the following exception when working with a datagrid control. Model: Customer----->Dependents. 0 to many relationship between Customer and Dependents Exception: Unable to cast object of type 'Mindscape.LightSpeed.EntityHolder`1[Domain.Customer]' to type 'System.ComponentModel.IEditableObject'."} The Customer is the Back Reference on the Dependent object. The Stack Trace: JvR |
|
|
Hi JvR, This issue was looked at however I will look into this for you. Do you have a small re-pro I could test with for you? Kind regards, John-Daniel |
|
|
Hi JD, I found the problem to be with WinForms databinding.
Thank you for the quick response.
|
|