Hi there,
I must be missing something but I cannot get my data elements to bind.
My code is quite straightforward.
I have two data readers :
Dim myCommand1 As New System.Data.SqlClient.SqlCommand("prcAccess_GetHeaderTransactionList", myConnection1)
myCommand1.CommandType = System.Data.CommandType.StoredProcedure
myConnection1.Open()
Dim myreader1 As SqlDataReader = myCommand1.ExecuteReader()
Dim myCommand3 As New System.Data.SqlClient.SqlCommand("prcAccess_GetDetailTransactionListByAccountNo", myConnection3)
myCommand3.CommandType = System.Data.CommandType.StoredProcedure
myConnection3.Open()
Dim myreader3 As SqlDataReader = myCommand3.ExecuteReader()
The first has a field "ST_ORDER_NUMBER" the second has one called "OH_ORDER_NUMBER"
I use the following code to bind and relate :
RadGridView3.DataSource = myreader1
Dim template As New GridViewTemplate()
template.DataSource = myreader3
RadGridView3.MasterTemplate.Templates.Add(template)
Dim relation As New GridViewRelation(RadGridView3.MasterTemplate)
relation.ChildTemplate = template
relation.RelationName = "OrderNumber"
relation.ParentColumnNames.Add("ST_ORDER_NUMBER")
relation.ChildColumnNames.Add("OH_ORDER_NUMBER")
RadGridView3.Relations.Add(relation)
Everything looks ok. But the the detail items are not displaying.
What am I missing?
Cheers
Tox
I must be missing something but I cannot get my data elements to bind.
My code is quite straightforward.
I have two data readers :
Dim myCommand1 As New System.Data.SqlClient.SqlCommand("prcAccess_GetHeaderTransactionList", myConnection1)
myCommand1.CommandType = System.Data.CommandType.StoredProcedure
myConnection1.Open()
Dim myreader1 As SqlDataReader = myCommand1.ExecuteReader()
Dim myCommand3 As New System.Data.SqlClient.SqlCommand("prcAccess_GetDetailTransactionListByAccountNo", myConnection3)
myCommand3.CommandType = System.Data.CommandType.StoredProcedure
myConnection3.Open()
Dim myreader3 As SqlDataReader = myCommand3.ExecuteReader()
The first has a field "ST_ORDER_NUMBER" the second has one called "OH_ORDER_NUMBER"
I use the following code to bind and relate :
RadGridView3.DataSource = myreader1
Dim template As New GridViewTemplate()
template.DataSource = myreader3
RadGridView3.MasterTemplate.Templates.Add(template)
Dim relation As New GridViewRelation(RadGridView3.MasterTemplate)
relation.ChildTemplate = template
relation.RelationName = "OrderNumber"
relation.ParentColumnNames.Add("ST_ORDER_NUMBER")
relation.ChildColumnNames.Add("OH_ORDER_NUMBER")
RadGridView3.Relations.Add(relation)
Everything looks ok. But the the detail items are not displaying.
What am I missing?
Cheers
Tox