how do I get the datagrid to display data from a child table

liptonIcedTea

Well-known member
Joined
Jan 18, 2007
Messages
89
Programming Experience
1-3
Ok, so I'm just wondering if this can be possibly done.

I have a dataset that is being generated from an XML file.

This dataset has two tables (User and UserSecurity) - that is related because they both have the same primary key. [i know, the tables should probably be combined, but this is the data that I have to work with]

I need to display these rows on a datagrid.

User.Surname
User.FirstName
User.DateOfBirth
UserSecurity.SecurityLevel
UserSecurity.Comments


I'm adding 5 columns to my datagrid, with the following data bindings. Surname, FirstName, DateOfBirth, UserSecurity.SecurityLevel, UserSecurity.Comments

However, it is saying that there is no UserSecurity.SecurityLevel - how do I get the datagrid to display data from a child table?
 
Last edited:
How are you loading the data into the grid? Are you using data-binding? If so then you have to create a single list that contains the data from both tables. If not then we'd need to see what you're doing to know what you're doing wrong.
 
Back
Top