FrodeNilsen posted on Friday, April 25, 2008
Short version: When you bind to a business object that contains a property of type FilteredBindingList<...> that is not null, the .Net framework gives you a SerializationException. Is there any way around this?
Long version: I have created a test project, FilteredBindingTest, you can download it
here. I want to be able to maintain a FilteredBindingList reference in my bound business object, but that seems to be a problem. I know FilteredBindingList isn't supposed to be serialized, so I thought I'd solve the problem by adding the [NonSerialized] attribute to the private property, but no. The problem only occurs when the property is instantiated.
If I drill down in the databinding process, I think it is the Clone() call in relation to the BeginEdit() due to the DataGridView-binding, that is the problem.
I am using CSLA 3.0.4
Any ideas?