Delete Item from EditableRootListBase using csla 2.1 for vb

Delete Item from EditableRootListBase using csla 2.1 for vb

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


mikeclimbs posted on Wednesday, August 23, 2006

I'm using EditableRootListBase as a datasource for a bindingsource.  When I call BindingSource removecurrent a NoSaveEditingException is raised.

I tried calling bindingsource.canceledit,  but still have the issue.

Any suggestions?

Thanks

Mike

RockfordLhotka replied on Wednesday, August 23, 2006

Interesting - thanks for pointing this out.

I am now thinking that I overlooked something in terms of reducing edit levels, and hopefully I can find a workable answer. Inside the collection, when notification of a delete request comes through, the code deletes the object - but it sounds like the edit level is still >0 at that point...

mikeclimbs replied on Wednesday, August 23, 2006

I'm starting a large app with many grids pointing at EditableRootListBase and would be glad to help you test this, once the issue is resolved. 

Mike

RockfordLhotka replied on Wednesday, August 23, 2006

I appreciate that very much.

If you could grab the latest version of ERLB.vb in cvs and give it a try that would be great. You'll need updated versions of Core\BusinessBase.vb and Core\IEditableBusinessObject.vb as well - I had to change those slightly to get this resolved.

I had tested this through unit tests, but that's obviously not enough to catch all the idiosyncratic behaviors of data binding... I think I now have it working correctly within data binding as well.

mikeclimbs replied on Wednesday, August 23, 2006

Rocky,

Grabbed the latest and the delete is working correctly.  I did a quick test of add, edit, delete and they all worked.

I will do more testing this afternoon and post my results.

Thanks for the quick response.

Mike

mikeclimbs replied on Wednesday, August 23, 2006

Rocky,

I did some additional testing today with standard VB components and devexpress components and everything worked great.

Thanks,

Mike

RockfordLhotka replied on Wednesday, August 23, 2006

That's great news! Thanks, that updated code will be in the next test release of 2.1 then.
 
Rocky

I did some additional testing today with standard VB components and devexpress components and everything worked great.

Thanks,

Mike

Copyright (c) Marimer LLC