ok
first
i have 2 table
Empolyee table
Cars table
each Emp has many Cars
and
one car for one Emp
i disgn a form contain
5 textbox for an Emp info
1 data grid view for car
so
how can i by code let data grid view show me cars for this Emp ( Not All Cars in table )
cuz
i do it like this
i use binding source and BindingNavigator
CODE
Public Class Add
Dim ConStr As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\BanIm\My Documents\Visual Studio 2005\Projects\CarPark3\CarPark3\CarPark3.mdf;Integrated Security=True;User Instance=True "
Dim Conn As New SqlClient.SqlConnection(ConStr)
Private Sub Add_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'CarPark3DataSet.Emps' table. You can move, or remove it, as needed.
Me.taEmps.Fill(Me.CarPark3DataSet.Emps)
'TODO: This line of code loads data into the 'CarPark3DataSet.Cars' table. You can move, or remove it, as needed.
Me.taCars.Fill(Me.CarPark3DataSet.Cars)
End Sub
ok
sorry for lating
&
thnkx for replay