Okay, Datasource is an Object, which allows it to handle multiple types of DataSources.
I'm having a user pass one in, I was "DirectCast"ing it to a DataSet, which is what I need, which worked fine if I choose A Dataset or TypedDataSet as the Datasource.
If I choose a BindingSource, it errors out here. Obviously you can't DirectCast a BindingSource into a DataSet.
But because things are Typed, I can't see how to make any logical statements to handle the DirectCasting.
If I getType, it returns the TypedClass (ie CustomerDataSet rather than DataSet; or CustomerBindingSource rather than BindingSource).
Is there any way to get to that base class?
I need to be able to tell "Is this a Dataset?" "Is this a BindingSource?" so I can handle that DirectCast and the different methods to get into a specified tables data.
I'm having a user pass one in, I was "DirectCast"ing it to a DataSet, which is what I need, which worked fine if I choose A Dataset or TypedDataSet as the Datasource.
If I choose a BindingSource, it errors out here. Obviously you can't DirectCast a BindingSource into a DataSet.
But because things are Typed, I can't see how to make any logical statements to handle the DirectCasting.
If I getType, it returns the TypedClass (ie CustomerDataSet rather than DataSet; or CustomerBindingSource rather than BindingSource).
Is there any way to get to that base class?
I need to be able to tell "Is this a Dataset?" "Is this a BindingSource?" so I can handle that DirectCast and the different methods to get into a specified tables data.