S
simonrigby_uk
Hello all,
Firstly, this is a .NET 2.0 issue. (C#)
I have a DataGridView and a dataset that has been generated by the
wizard from a strongly typed collection. In my form_load I am
attempting to add an instance of this collection to the BindingSource
eg.
gridBindingSource.Add(myStronglyTypedCollectionInstance);
I am getting an Invalid Operation Exception (Objects added to a
BindingSource's list must all be of the same type).
The collection in question is a strongly typed collection of abstract
objects. That is, I have an abstract class which is generalised by two
sub classes. I have built a collection to hold the abstracts.
Note this happens even though the collection is empty.
Is this a limitation of the BindingSource?
Any help greatly appreciated.
Cheers
Simon
Firstly, this is a .NET 2.0 issue. (C#)
I have a DataGridView and a dataset that has been generated by the
wizard from a strongly typed collection. In my form_load I am
attempting to add an instance of this collection to the BindingSource
eg.
gridBindingSource.Add(myStronglyTypedCollectionInstance);
I am getting an Invalid Operation Exception (Objects added to a
BindingSource's list must all be of the same type).
The collection in question is a strongly typed collection of abstract
objects. That is, I have an abstract class which is generalised by two
sub classes. I have built a collection to hold the abstracts.
Note this happens even though the collection is empty.
Is this a limitation of the BindingSource?
Any help greatly appreciated.
Cheers
Simon