How to use the remove method on grandchildren?

How to use the remove method on grandchildren?

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


enya posted on Friday, June 27, 2008

I am trying to remove a grandchild from the list of grandchildren by using the .Remove method, but it doesn't work. I get an exception - "Specified method is not supported".

It works fine when I just have Parent > Child Collection, but it doesn't work with grandchildren...

Please HELP!

Friend Sub RemoveTrustAccountDetailItem(ByVal itm As TrustAccountDetailItem)

      trustAccount.TrustAccountHeaderList(1).TrustAccountDetailList.Remove(itm)

End Sub

enya replied on Saturday, June 28, 2008

I think I found out what the problem was - I used CslaGen to generate my objects and on my grandchild collection "Allow Remove"  property was set to False... Surprise [:O]

 

 

Copyright (c) Marimer LLC