EditableRootCollection not update after child IsDirty.

EditableRootCollection not update after child IsDirty.

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


kids_pro posted on Thursday, September 14, 2006

Hi there,
I am currently having trouble with EditableRootCollection and my UI.
I decided to create BO like this:

If I enable user editing in the DataGridView directly everything work fine.
But when I decided to let the user use detail form for editing  changes do not reflect back to the DataGridView form.

this is how I past object from MainForm to Detail Form:

BO.List.Contractor c = contractorsBindingSource.Current as BO.List.Contractor;
DetailForm frmDetail = new DetailForm(c);
frmDetail.ShowDialog(MainForm.Instance);

Please advice.

ajj3085 replied on Friday, September 15, 2006

This has been discussed before.  Its been a while though, but I think the solution is usuall to check out the ActiveObjects project, which extends Csla, and use the Observer functionality so that the read only object can update itself.

If you don't want to go that route, you'll have to have some way for the UI to tell the datagridview to reload either all rows or just a certain row.. I haven't done this yet, so I'm not sure the best practice to advise you.

HTH
Andy

Copyright (c) Marimer LLC