EditableRootList

EditableRootList

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


dantes1 posted on Wednesday, September 05, 2007

Im having problem in updating an item inside a collection (EditableRootList). after updating and clicking the save button, an exception will return "Csla.Validation.ValidationException" -- Object is still being edited and can not be saved...

I know that its because of the EditLevel... i checked it and its greater than zero...

i have an idea on how to solve this... when inside the code for saving the list i will call the ApplyEdit() method until the EditLevel is zero... but id like to have a sample code on how to do this...

tnx... so much for the help...

RockfordLhotka replied on Thursday, September 06, 2007

I've been down the road you are considering. It doesn't work.

Read this thread

http://forums.lhotka.net/forums/thread/16971.aspx

It talks about the only known way to get this correct (which is in the 3.0.2 code).

dantes1 replied on Thursday, September 06, 2007

rocky, i tried my idea... i created a counter for the editlevel. then on the save method i just created a loop until the counter decrements to zero... inside the loop is an ApplyEdit...

when i run  it worked though... when i edited a certain item then go to another item and edit it. then click the cancel button... it works... but always when i already had many changes... when i click the cancel button... two items where restored at the same time...

i havent read thoroughly the link you gave me though...


Copyright (c) Marimer LLC