Hello. Merry Christmas to you all.
I have A radgrid, bound to 2 datasets with hierarchy.
The relation is based upon a number, as it has to keep track of orders entered in the database.
My only issue is that orders that needs to be deliverd, gets a delivery number instead of an order number.
Here's my problem.
So from dataset 1 it loads all the data needed, included the order number. In my child, i call all the records containing that order number.
But when I need to load data for the delivery number, i get zero returns, because the order number acutally can not be changed.
So i need a way to make the grid look if the delivery number is 0, then load based on order number.
If deliver number > 0, then load based on delivery number.
Here's my code.
Hoping someone can help me.
I have A radgrid, bound to 2 datasets with hierarchy.
The relation is based upon a number, as it has to keep track of orders entered in the database.
My only issue is that orders that needs to be deliverd, gets a delivery number instead of an order number.
Here's my problem.
So from dataset 1 it loads all the data needed, included the order number. In my child, i call all the records containing that order number.
But when I need to load data for the delivery number, i get zero returns, because the order number acutally can not be changed.
So i need a way to make the grid look if the delivery number is 0, then load based on order number.
If deliver number > 0, then load based on delivery number.
Here's my code.
Hoping someone can help me.
dsRittenTemp.Clear() dsGoederenTemp.Clear() ' cmdRittenTemp = New Odbc.OdbcCommand("Select * FROM ritten_temp WHERE ritnummer = '" & RitNummer & "'", cn) adpRittenTemp = New Odbc.OdbcDataAdapter(cmdRittenTemp) adpRittenTemp.Fill(dsRittenTemp, "ritten_temp") ' cmdGoederenTemp = New Odbc.OdbcCommand("Select * FROM goederen_temp", cn) adpGoederenTemp = New Odbc.OdbcDataAdapter(cmdGoederenTemp) adpGoederenTemp.Fill(dsGoederenTemp, "goederen_temp") ' Me.RadGridViewOverView.MasterTemplate.Templates.Clear() RadGridViewOverView.DataSource = dsRittenTemp RadGridViewOverView.DataMember = "ritten_temp" Dim template As New GridViewTemplate() template.DataSource = dsGoederenTemp template.DataMember = "goederen_temp" RadGridViewOverView.MasterTemplate.Templates.Add(template) Dim relation As New GridViewRelation(RadGridViewOverView.MasterTemplate) relation.ChildTemplate = template relation.RelationName = "goederenticket" relation.ParentColumnNames.Add("goederenticket") relation.ChildColumnNames.Add("goederenticket") RadGridViewOverView.Relations.Add(relation) RadGridViewOverView.AllowEditRow = False RadGridViewOverView.MasterTemplate.Templates(0).AllowEditRow = False