Home All Groups Group Topic Archive Search About

Datagrid relationships

Author
18 Aug 2006 5:46 AM
dallasfreeman
How do you make a datagrid show an additional row under each row with
data connected by a relationship to another table (as like when you
create a relationship between tables in Access).

I have two tables
1
tblSurvey
Survey_ID
Q1
Q2
Q3

2
tblSurveyExtra
QuestionID
SurveyID
Answer

I want to be able to view the tblSurveyExtra.Answer for each Survey_ID
from tblSurvey

Author
18 Aug 2006 6:27 AM
Cor Ligthert [MVP]
Dallas,

In a winform you cannot.
In a webpage I thought it was possible but I don't know how.

Therefore for others who maybe know this, what kind of datagrid

Cor

Show quoteHide quote
"dallasfreeman" <dallas.free***@sjk.net.au> schreef in bericht
news:1155879984.733253.318700@74g2000cwt.googlegroups.com...
> How do you make a datagrid show an additional row under each row with
> data connected by a relationship to another table (as like when you
> create a relationship between tables in Access).
>
> I have two tables
> 1
> tblSurvey
> Survey_ID
> Q1
> Q2
> Q3
>
> 2
> tblSurveyExtra
> QuestionID
> SurveyID
> Answer
>
> I want to be able to view the tblSurveyExtra.Answer for each Survey_ID
> from tblSurvey
>
Author
18 Aug 2006 1:39 PM
Dblood
Have you considered creating a view in SQL that joins the two tables on
Survey_ID and then using that view as your data source for your
datagrid, or are specifically wanting the data only to appear when the
user clicks on the survey data?

Hope this helps,

dkb