|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGridView for several tabels in a DataSetI have a DataSet with two tables in it, with a relation between them.
I fill the tables with records programmatically with these commands: System.Data.DataRow newRow = myTable.NewRow(); //give values to each column in the row myTable.Rows.Add(newRow); I want to create a DataGridView that is bounded to this dataset and show in each row columns from both tables. But when I set the DataSource of the DataViewGrid to the DataSet, I can only pick one table from the DataSet as the DataMember. And then I can only choose columns from that specific table. I tried setting the relation as the DataMember - but it seems the relations only has columns from one of that tables and I couldn't find how to change that. Is there a way to "join" the columns of the two tables into one DataGridView? Thanks No.
Robin S. -------------------------------------- <atall***@hotmail.com> wrote in message Show quote news:1170083999.038164.113590@v33g2000cwv.googlegroups.com... >I have a DataSet with two tables in it, with a relation between them. > I fill the tables with records programmatically with these commands: > System.Data.DataRow newRow = myTable.NewRow(); > //give values to each column in the row > myTable.Rows.Add(newRow); > I want to create a DataGridView that is bounded to this dataset and > show in each row columns from both tables. > But when I set the DataSource of the DataViewGrid to the DataSet, I > can only pick one table from the DataSet as the DataMember. And then I > can only choose columns from that specific table. > I tried setting the relation as the DataMember - but it seems the > relations only has columns from one of that tables and I couldn't find > how to change that. > > Is there a way to "join" the columns of the two tables into one > DataGridView? > > Thanks > |
|||||||||||||||||||||||