Refresh some instance of child Object from Database, throw error!

Refresh some instance of child Object from Database, throw error!

Old forum URL: forums.lhotka.net/forums/t/9183.aspx


simon posted on Thursday, July 08, 2010

there is a BusinessListObject ProductCategorys, and its child BusinessBase  ProductCategory

I refresh a instance of productcategory, and rebind the UI, throw exception "Edit level mismatch in CopyState"

 

RockfordLhotka replied on Thursday, July 08, 2010

This is with Windows Forms I assume?

You absolutely must unbind all objects from the UI before directly interacting with the objects (to do things like save or refresh). This is due to the way Windows Forms data binding works, as it is something I discuss at some length in the Using CSLA .NET 3.0 ebook (http://store.lhotka.net/).

Copyright (c) Marimer LLC