EditableRootListBase sample code in Winforms

EditableRootListBase sample code in Winforms

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


dantes1 posted on Wednesday, September 05, 2007

Hi... im having trouble understanding the  EditableRootListBase... especially with the ApplyEdit part... when i try to save the object it will return an exception Csla.Validation.ValidationException "Object is still being edited and can not be saved"

i know that it cant be saved because of the EditLevel... its greater than zero...

but im not sure how to solve it... i have an idea though... ill try to call the ApplyEdit() method until the EditLevel is zero... but id like to know how people with extensive knowledge on CSLA do it...

tnx...

RockfordLhotka replied on Wednesday, September 05, 2007

Have you looked at the CSLA .NET Version 2.1 Handbook? I discuss ERLB in that book, including how it works and how to use it.

There is a basic sample in the svn code repository as well

http://www.lhotka.net/cslacvs/viewvc.cgi/samples/trunk/ERLBTest/

The idea behind ERLB is that you don't have to do anything beyond binding the list to a grid. If you think you need to do more than that, then you are probably making it more complex than it should be Smile [:)]

Copyright (c) Marimer LLC