MultiTable in DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to show the relation between two tables, for example BookTitles and
Authors, in a DataGrid. I want show Authors and when I click one, I want all
the author's books appears under him in the same datagrid.

Any code snippets ???

Many thanks
NQ
 
Hi NQ,

Load both tables into the same dataset. The dataset must have a proper
relation established between the two tables. Bind the DataGrid so that the
data source is the dataset and the data member is the name of the first
table (I mean the value of it's TableName property). Then, each Author row
must have a plus icon to the left. Clicking this icon should navigate to the
child rows.
 
Thanks a lot Dmytro Lapshyn
NQ

Dmytro Lapshyn said:
Hi NQ,

Load both tables into the same dataset. The dataset must have a proper
relation established between the two tables. Bind the DataGrid so that the
data source is the dataset and the data member is the name of the first
table (I mean the value of it's TableName property). Then, each Author row
must have a plus icon to the left. Clicking this icon should navigate to the
child rows.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]


NQ said:
I want to show the relation between two tables, for example BookTitles and
Authors, in a DataGrid. I want show Authors and when I click one, I want
all
the author's books appears under him in the same datagrid.

Any code snippets ???

Many thanks
NQ
 
Back
Top