Greetings. Is there a way to nest two Datatables in a single Datagridview so that the data is displayed like so:
+ Parent Row #1
- Parent Row #2
. - Child Row related to Parent Row #2 (1)
. - Child Row related to Parent Row #2 (2)
. - Child Row related to Parent Row #2 (3)
+ Parent Row #3
+ Parent Row #4
I have an example of something similar using a DataGrid, but can not find a reference to this with the DataGridView. Here is the code used with the DataGrid:
Code:Dim student_is_relation As DataRelation = _ scores_dataset.Relations.Add( _ "Student Test Scores", _ students_table.Columns("StudentId"), _ test_scores_table.Columns("StudentId")) student_is_relation.Nested = True grdScores.DataSource = scores_dataset




Reply With Quote