Dear All
I want to link between Parent Form with controls and Child Form as a data grid view , I made the SQL connections, the problem is when I navigate the parent form the child form does not navigate with it , Here is the code
What should I do to link between the navigator and the child to navigate with the parent together.
Thanks, Regards
I want to link between Parent Form with controls and Child Form as a data grid view , I made the SQL connections, the problem is when I navigate the parent form the child form does not navigate with it , Here is the code
VB.NET:
Private BS1 As New BindingSource
Private BS2 As New BindingSource
Dim dsMain, dsSub As New DataSet
databaseconnection()
Dim SqlMain = "SELECT * FROM tbl_Tenders_Main"
Dim daMain = New SqlDataAdapter(SqlMain, connection)
daMain.Fill(dsMain, "Main")
BS1.DataSource = dsMain.Tables("Main")
txt_TenderNo.DataBindings.Add("Text", BS1, "TenderNo")
BindingNavigator1.BindingSource = BS1
Dim SqlSub = "SELECT * FROM tbl_Tenders_Sub INNER JOIN tbl_Tenders_Main ON tbl_Tenders_Sub.TenderNo =
tbl_Tenders_Main.TenderNo"
Dim daSub = New SqlDataAdapter(SqlSub, connection)
daSub.Fill(dsSub, "Sub")
BS2.DataSource = dsSub.Tables("Sub")
DataGridView1.DataSource = BS2
connectionclose()
What should I do to link between the navigator and the child to navigate with the parent together.
Thanks, Regards
Last edited by a moderator: