Errors subclassing BusinessListBase

Errors subclassing BusinessListBase

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


bgilbert posted on Monday, May 07, 2007

Hi,
I've created subclasses for BusinessBase and BusinessListBase, however, I'm having databinding issues with the list class. This is my class signature:

Serializable()> _
Public MustInherit Class MyBusinessListBase( _
        Of T As MyBusinessListBase(Of T, C), _
        C As BusinessBase(Of C))
    Inherits BusinessListBase(Of T, C)
    Implements ITypedList
Does this look correct? My primary purpose at this point is the implementation of the ITypedList.

This compiles just fine, but when I try to create a datasource from it and assign it to the DataSource property of a BindingSource, I get an error:
"BindingSource unable to create list based on the Type specified in the DataSource property."

Thanks for any insights.
Barry

bgilbert replied on Monday, May 07, 2007

I just found out that if I add a public constructor to the class that inherits from this list class, it seems to work. I guess it's a reasonab;e workaround, but I don't entirely understand why this is necessary.

Barry

Copyright (c) Marimer LLC