Master/Detail EditLevelMismatchException

Master/Detail EditLevelMismatchException

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


Marinko posted on Sunday, September 16, 2007

I’m trying to realize a Parent/Child respectively Master/Detail relation using DataGridView. The parent object is a BusinessList of the parents with address information and the child DataGridView contains the information about the children. Both DataGridViews are editable.

 

ParentList
 - Parent1
 - Parent2
 - Parent3

 

ChildList
 - Child1 of Parent1
 - Child2 of Parent1

 

My problem is if the ChildList is a BusinessList I got the EditLevelMismatchException exception:

if (this.EditLevel + 1 > parentEditLevel)

throw new UndoException(string.Format(Resources.EditLevelMismatchException, "CopyState"));

If I run the solution the first record in the ParentList is selected. All I do is select the second record and then I go back to the first record again.

If the ChildList is ReadOnlyBusinessList all works fine. Any Idea?

sntslm replied on Monday, September 17, 2007

Try CSLA 3.0.2 test version 4 ,the exception will disappear.

Copyright (c) Marimer LLC