Parent Child Grid

tchavez

Member
Joined
Nov 11, 2005
Messages
21
Programming Experience
1-3
I need help I cant get this to display parent child rows.

Dim CallsGo As New MySql.Data.MySqlClient.MySqlCommand("Calls", AuthCheck)
CallsGo.CommandType = Data.CommandType.Text
CallsGo.CommandText =
"Select * from calls"
Dim NotesGo As New MySql.Data.MySqlClient.MySqlCommand("Notes", AuthCheck)
NotesGo.CommandType = Data.CommandType.Text
NotesGo.CommandText =
"Select * from notes,calls Where (calls.reference = notes.reference)"
Dim CallsGoAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(CallsGo)
Dim NotesGoAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(NotesGo)
Dim ds As New Data.DataSet()
CallsGoAdapter.Fill(ds,
"calls")
NotesGoAdapter.Fill(ds,
"notes")
ds.Relations.Add(
New Data.DataRelation("relCalls", ds.Tables("calls").Columns("reference"), ds.Tables("notes").Columns("reference")))
gv1.DataSource = ds
gv1.DataMember =
"calls"
gv1.DataBind()
 
Back
Top