I have a DataSource and a DataMember (like with standard bindings). Now, I
want to write a function that gets the source object from them. So, let's
say DataSource is a dataset and DataMember is "MyTable.Col1", I want to
return MyDataSet.Tables("MyTable")
I decompiled BindingContext and CurrencyManager classes to see how it can be
done, and from what I understand, it is done with the TypeDescriptor class,
like this:
DataSet ds = new DataSet();
ds.Tables.Add("Table1");
PropertyDescriptor Prop = TypeDescriptor.GetProperties(ds)["Table1"];
However, this doesn't work. Prop stays null. So, how am I supposed to do
that? Am I near the solution or completly off the track?
Thanks!
Etienne