S
Shan1986
Guest
Hallo,
I have 2 combo boxes and i want to filter or show the data in a data grid view based on the 2 combo boxes, i know i can filter the table or binding source in many ways but just want to know if it possible to do it via data relations.
I want to show the table 3 in data grid view based on the value from table 1 & 2 how to add data relation for the following setup if possible.
DS.Relations.Add("Tab1toTab3", Tables("Tab1").Columns("Col1"), Tables("Tab3").Columns("Col1"))
DS.Relations.Add("Tab2toTab3", Tables("Tab2").Columns("Col2"), Tables("Tab3").Columns("Col3"))
Dim BS1 As New BindingSource With {.DataSource = DS, .DataMember = "table1"}
Dim BS2 As New BindingSource With {.DataSource = BS1, .DataMember = "Tab1toTab3"}
Dim BS3 As New BindingSource With {.DataSource = BS2, .DataMember = "Tab2toTab3"} '''this does not work
is it possible to something like this? thanks
Continue reading...
I have 2 combo boxes and i want to filter or show the data in a data grid view based on the 2 combo boxes, i know i can filter the table or binding source in many ways but just want to know if it possible to do it via data relations.
I want to show the table 3 in data grid view based on the value from table 1 & 2 how to add data relation for the following setup if possible.
DS.Relations.Add("Tab1toTab3", Tables("Tab1").Columns("Col1"), Tables("Tab3").Columns("Col1"))
DS.Relations.Add("Tab2toTab3", Tables("Tab2").Columns("Col2"), Tables("Tab3").Columns("Col3"))
Dim BS1 As New BindingSource With {.DataSource = DS, .DataMember = "table1"}
Dim BS2 As New BindingSource With {.DataSource = BS1, .DataMember = "Tab1toTab3"}
Dim BS3 As New BindingSource With {.DataSource = BS2, .DataMember = "Tab2toTab3"} '''this does not work
is it possible to something like this? thanks
Continue reading...