0
Answer

Dataview and Relationships

bryan 0

bryan 0

19y
1.6k
1
Hi, How do i input 2 related tables' fields into a dataview which is displayed on a datagrid, choosing the fields (columns) i want to display, anyone knows or have any examples? Table1: ID, Name, Age, Sex, Job Table2: ID, JobName, Salary For example, I created a relationship "Table1Table2" I would like my datagrid to display the fields: ID,Name,Age,Sex,Job,JobName. JobName is from Table2, the others from Table1. Not sure how to do it, these are my codes so far daTable1.Fill(ds) daTable2.Fill(ds) dataview = ds.DefaultView datagrid.Datasource = dataview - help appreciated! thanx!