See Microsoft KB Article 326080: HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET
-Andy Hopper ----- Original Message ----- From: "D.J. Stachniak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 3:51 PM Subject: [ADVANCED-DOTNET] Querying across tables in a dataset > Hi everyone, > > I have a strongly-typed dataset with 5 tables. The relationships between > all the tables are already in the dataset. I want to create a dataview to > bind to a datagrid (in a WinForm app) where the data is spread across > (joined) between 3 tables. How can I create a view with a subset of the > data to be bound to the datagrid? > > Just to spell things out, let's say I have tables 1, 2 and 3. I basically > want the data grid to have 4 columns - table 1 - column 2, table 1 - > column 3, table 2 - column 3, table 3 - column 4. Is there a way for me > to create a view for this? I am not familiar with the DataRelation class, > so I'm not sure if that's what I want to use or should be looking at. > > I don't need to filter the data by rows. In essence, I just want to > create a table from all the existing tables in the dataset and filter out > columns (create a view). Any ideas on how I can do this without resorting > to the ugliness of manually creating a table and iterating through all the > rows pulling out only the data I need? > > Thanks in advance, > D.J. Stachniak
