I've tried to set a BindingSource DataSource property to a DataSet
with many tables. Now I try to connect two DataGridView to the same
BindingSource, but using two different DataMember (one with the name
of one table and the other with another). Everything is working, the
two DataGridView controls are rendering well. Everyone has its own
cursor, I can change the data and all. The problem is that if I want
to use the properties and methods of the BindingSource object I can't
specify which table I'm referring to...
For example, if I write

bs.Position++;

which cursor table is going to move? No one actually, as I have
already tried...But why can't I specify the which table I want to
manage from the BindingSource if the BindingSource is actually capable
of working with multipled set of data? Am I supposed to use a single
BindingSource object for each table of the database?

Thank you for your help

cold

Re: Connect to BindingSource with DataMember by RobinS

RobinS
Sat Apr 26 22:38:29 CDT 2008

Yes, use a separate binding source for each table you want to bind.

RobinS.


"cold80" <cold80@libero.it> wrote in message
news:ddee2469-1a99-4979-8014-54243725d673@w74g2000hsh.googlegroups.com...
> I've tried to set a BindingSource DataSource property to a DataSet
> with many tables. Now I try to connect two DataGridView to the same
> BindingSource, but using two different DataMember (one with the name
> of one table and the other with another). Everything is working, the
> two DataGridView controls are rendering well. Everyone has its own
> cursor, I can change the data and all. The problem is that if I want
> to use the properties and methods of the BindingSource object I can't
> specify which table I'm referring to...
> For example, if I write
>
> bs.Position++;
>
> which cursor table is going to move? No one actually, as I have
> already tried...But why can't I specify the which table I want to
> manage from the BindingSource if the BindingSource is actually capable
> of working with multipled set of data? Am I supposed to use a single
> BindingSource object for each table of the database?
>
> Thank you for your help
>
> cold