I have a DataSet with two tables which are in a master-detail relationship.
How do I show a detail table in datagrid and some columns from a master
table. (Ex.: Orders and a customer name for every order comes from a
Customers table).

Re: DataGrid with Master-Detail DataSet by Chuck

Chuck
Mon May 02 01:00:01 CDT 2005

Alexey, First make sure that your dataset has the relationship defined. If
so, for the first datagrid, set the data souce to the dataset and the
datamember to the master table. For the second datagrid, set the data source
to the dataset. For the data memeber click the + on the master table in the
drop down and choose the linked table. There is an example in the msdn doc
on doing this but the key is having the relationship defined in the
dataset...Chuck
"Alexey Maykov" <maykov@gmail.com> wrote in message
news:ePMkgTpTFHA.2172@tk2msftngp13.phx.gbl...
>I have a DataSet with two tables which are in a master-detail relationship.
> How do I show a detail table in datagrid and some columns from a master
> table. (Ex.: Orders and a customer name for every order comes from a
> Customers table).
>
>



Re: DataGrid with Master-Detail DataSet by Alex

Alex
Tue May 03 12:13:45 CDT 2005

I have solved this problem by using virtual table (Views ) to select
necessary fields from two tables and then make the DataSource of datagrid
point to this virtual table , even I don't know if I have done correctly.



"Chuck Rudolph" <chuckrudolph@newsgroup.nospam> wrote in message
news:ukHD8OtTFHA.2532@TK2MSFTNGP10.phx.gbl...
> Alexey, First make sure that your dataset has the relationship defined. If
> so, for the first datagrid, set the data souce to the dataset and the
> datamember to the master table. For the second datagrid, set the data
source
> to the dataset. For the data memeber click the + on the master table in
the
> drop down and choose the linked table. There is an example in the msdn doc
> on doing this but the key is having the relationship defined in the
> dataset...Chuck
> "Alexey Maykov" <maykov@gmail.com> wrote in message
> news:ePMkgTpTFHA.2172@tk2msftngp13.phx.gbl...
> >I have a DataSet with two tables which are in a master-detail
relationship.
> > How do I show a detail table in datagrid and some columns from a master
> > table. (Ex.: Orders and a customer name for every order comes from a
> > Customers table).
> >
> >
>
>