Thanks you masters!
This is what i did
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
If FullNameTableBindingSource.Current IsNot Nothing Then
'Get the DataRow selected in the parent grid.
Dim parentRow = DirectCast(FullNameTableBindingSource.Current, DataRowView)
'Get the ID of the selected row.
Dim parentId = CInt(parentRow("StudenID"))
'Select the row with the same parent ID in the first child grid.
CourseBindingSource.Position = CourseBindingSource.Find("StudenID", parentId)
End If
Else
Me.DataGridView1.ClearSelection()
Me.DataGridView2.ClearSelection()
Me.DataGridView3.ClearSelection()
End If
End Sub
Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then
If FullNameTableBindingSource.Current IsNot Nothing Then
'Get the DataRow selected in the parent grid.
Dim parentRow = DirectCast(FullNameTableBindingSource.Current, DataRowView)
'Get the ID of the selected row.
Dim parentId = CInt(parentRow("StudenID"))
'Select the row with the same parent ID in the first child grid.
CourseBindingSource.Position = CourseBindingSource.Find("StudenID", parentId)
'Select the row with the same parent ID in the second child grid.
ContactNumberBindingSource.Position = ContactNumberBindingSource.Find("StudenID", parentId)
End If
Else
Me.DataGridView1.ClearSelection()
Me.DataGridView2.ClearSelection()
Me.DataGridView3.ClearSelection()
End If
End Sub
Result!
I use check box because i dont know how to use it in OnCellClickEvent.
Now im reading about the codes ive used so that i can fully understand their function.
Thank You Very Much! Hope I can still ask help from you in the future even being so spoonfeeder.