H
HS1
Hello all
I followed the example in Visual Studio.net to create a master and detail
relationship as following:
two tables: Customers and Orders
two DataGrid: GridOrders and GridDetails
--------------
Dim myDataRelation As DataRelation
myDataRelation = New DataRelation (
"CustomerOrder",dataSet.Table("Customers).Columns("CustomerID"),
ds.Tables("Orders").Columns("CustomerID"))
dataSet.Relations.Add(myDataRelation)
GridOrders.SetDataBindings(dataSet, "Customers")
GridDetails.SetDataBindings(dataSet, "Customers.CustomerOrder")
----------------------------------
The code work OK.When I click on a sign (+) in a record in a Master Grid
(GridOrders), I can see a lower link "CustomerOder ". then when I click in
that link, the "Detail" of that record will be shown in the Detail Grid.
Do you know a way so that when I click on the (+) sign, the Detail Grid will
show details of the record (that means I don't have to click to the link any
more- I don't need this link- similarly to Form and Subform in Microsoft
Access)
Many thanks
S.Hoa
I followed the example in Visual Studio.net to create a master and detail
relationship as following:
two tables: Customers and Orders
two DataGrid: GridOrders and GridDetails
--------------
Dim myDataRelation As DataRelation
myDataRelation = New DataRelation (
"CustomerOrder",dataSet.Table("Customers).Columns("CustomerID"),
ds.Tables("Orders").Columns("CustomerID"))
dataSet.Relations.Add(myDataRelation)
GridOrders.SetDataBindings(dataSet, "Customers")
GridDetails.SetDataBindings(dataSet, "Customers.CustomerOrder")
----------------------------------
The code work OK.When I click on a sign (+) in a record in a Master Grid
(GridOrders), I can see a lower link "CustomerOder ". then when I click in
that link, the "Detail" of that record will be shown in the Detail Grid.
Do you know a way so that when I click on the (+) sign, the Detail Grid will
show details of the record (that means I don't have to click to the link any
more- I don't need this link- similarly to Form and Subform in Microsoft
Access)
Many thanks
S.Hoa