I created 2 DataGridView and attached Arrays to each. DataRelation added to DataGrid1 does NOT show the expected [+] sign ... any ideas? thanx in advance
Dim i, j
Dim ds As System.Data.DataSet = New System.Data.DataSet
Dim iis As New System.Data.DataTable("iis")
Dim jjs As New System.Data.DataTable("jjs")
ds.Tables.Add(iis)
ds.Tables.Add(jjs)
iis.Clear()
iis.Columns.Add(New DataColumn("i Char", GetType(String)))
iis.Columns.Add(New DataColumn("Id", GetType(Integer)))
For j = 0 To 3
iis.Rows.Add(New Object() {Chr(Asc("a") + j), j})
Next
jjs.Clear()
jjs.Columns.Add(New DataColumn("i Char", GetType(String)))
jjs.Columns.Add(New DataColumn("Id", GetType(Integer)))
For j = 0 To 3
jjs.Rows.Add(New Object() {Chr(Asc("m") + j), j})
Next
DataGridView1.DataSource = iis
DataGridView2.DataSource = jjs
Dim iijj As DataRelation
Dim parentCol As DataColumn
Dim childCol As DataColumn
parentCol = iis.Columns("Id")
childCol = jjs.Columns("Id")
iijj = New DataRelation("iijj", parentCol, childCol)
ds.Relations.Add(iijj)
Dim i, j
Dim ds As System.Data.DataSet = New System.Data.DataSet
Dim iis As New System.Data.DataTable("iis")
Dim jjs As New System.Data.DataTable("jjs")
ds.Tables.Add(iis)
ds.Tables.Add(jjs)
iis.Clear()
iis.Columns.Add(New DataColumn("i Char", GetType(String)))
iis.Columns.Add(New DataColumn("Id", GetType(Integer)))
For j = 0 To 3
iis.Rows.Add(New Object() {Chr(Asc("a") + j), j})
Next
jjs.Clear()
jjs.Columns.Add(New DataColumn("i Char", GetType(String)))
jjs.Columns.Add(New DataColumn("Id", GetType(Integer)))
For j = 0 To 3
jjs.Rows.Add(New Object() {Chr(Asc("m") + j), j})
Next
DataGridView1.DataSource = iis
DataGridView2.DataSource = jjs
Dim iijj As DataRelation
Dim parentCol As DataColumn
Dim childCol As DataColumn
parentCol = iis.Columns("Id")
childCol = jjs.Columns("Id")
iijj = New DataRelation("iijj", parentCol, childCol)
ds.Relations.Add(iijj)