I can't delete child - error in BindingListI can't delete child - error in BindingList
Old forum URL: forums.lhotka.net/forums/t/7848.aspx
Fele posted on Thursday, October 22, 2009
Hi!
In my application I've implemented parent/child scenario.I can remove children from list. However, from time to time, I'm getting error in BindingList.cs when csla try to raise CollectionChanged event. Error message: "NullReferenceException was unhandled by user code" ( Object reference not set to an instance of an object).
Any suggestion why I'm getting this error?
Thanks
Fele
Csla 3.6.2
Silverlight
RockfordLhotka replied on Thursday, October 22, 2009
Getting an exception while raising an event typically means that some code that handled the event threw the exception.
In other words, somewhere in the app there's an event handler hooked up to that CollectionChanged event, and in that event handler there's a bug where the code gets a NullReferenceException.
RockfordLhotka replied on Thursday, October 22, 2009
Oh, and are you using Silverlight 2 or 3?
There was a change from SL 2 to 3 that broke collections, and the fix is in CSLA .NET 3.7 - so perhaps that's the issue?
Fele replied on Thursday, October 22, 2009
Thanks for fast response.
I've upgraded my project with 3.7.1 dll's. I tried it, without changing anything and I got "CommunicationException was unhandled by user code" (The remote server returned an error: NotFound)
Any suggestion?
Fele replied on Thursday, October 22, 2009
I put back dll's for ver 3.6.2. It works fine. No errors
RockfordLhotka replied on Thursday, October 22, 2009
it sounds like you may not have rebuilt and redeployed both
client and server assemblies? So you don’t have the same versions of everything
on the server after you try 3.7.
Fele replied on Friday, October 23, 2009
I rebuild and redeployed both client and server assembly. It works fine. No WCF error.
However, I still have original error.
When I deleting group of records, data is grouped in the DataGrid, or last record in group, I'm getting "NullReferenceExcepition was unhandled by user code" () error message in OnCollectionChanged method of BindingList.cs.
When I deleting one by one recrods in group with exception of last one, I'm not getting error messages.
Any suggestion?
Thanks
Fele
Silverlight
Csla 3.7.1
Copyright (c) Marimer LLC