bernhard7gruber
Member
- Joined
- Aug 11, 2003
- Messages
- 5
i have a dataset with 2 tables and a relation between these 2 tables
now i show both tables in 2 grids on one form
what i want is:
when i klick in a row in the mastergrid the slavegrid should show only those records that fit the key in the mastergrid
e.g. : customers and orders -->
when im at a certain customer in the mastergrid, i only whant to see the orders for that customer in the slavegrid
here the code (dataset & relation created in the designer)
SqlDataAdapter1.Fill(DataSet11, "master")
SqlDataAdapter2.Fill(DataSet11, "slave")
With DataGrid1
.DataSource = DataSet11
.SetDataBinding(DataSet11, "master")
End With
With DataGrid2
.DataSource = DataSet11
.SetDataBinding(DataSet11, "slave")
End With
how does the
slaveGrid_CurrentCellChanged method look like ??
or do i have to use a dataview where i set the key explicitly ????
now i show both tables in 2 grids on one form
what i want is:
when i klick in a row in the mastergrid the slavegrid should show only those records that fit the key in the mastergrid
e.g. : customers and orders -->
when im at a certain customer in the mastergrid, i only whant to see the orders for that customer in the slavegrid
here the code (dataset & relation created in the designer)
SqlDataAdapter1.Fill(DataSet11, "master")
SqlDataAdapter2.Fill(DataSet11, "slave")
With DataGrid1
.DataSource = DataSet11
.SetDataBinding(DataSet11, "master")
End With
With DataGrid2
.DataSource = DataSet11
.SetDataBinding(DataSet11, "slave")
End With
how does the
slaveGrid_CurrentCellChanged method look like ??
or do i have to use a dataview where i set the key explicitly ????