AddNew Multiple DataSets

Roey

Well-known member
Joined
Oct 10, 2002
Messages
238
Location
Canada
I am creating a Sales Order screen and loading multiple Datasets within it, for example a Dataset with sold items, another with customers, etc. When I use

Me.BindingContext(Me.dsSalesOrder.Table("SalesOrder").DefaultView).AddNew()

to create a new Sales Order the Customers Name is cleared due to the fact that it is stored within the SalesOrder dataset. However, the address and contact information is not cleared as it is stored in the Customers dataset.

How do I synchronize these datasets so that Addnew on SalesOrder clears the displays for related datasets?
 
Cant you use one dataset with multiple datatables, this will make it easier to create relationships between tables.
 
Roey said:
I am creating a Sales Order screen and loading multiple Datasets within it, for example a Dataset with sold items, another with customers, etc. When I use

Me.BindingContext(Me.dsSalesOrder.Table("SalesOrder").DefaultView).AddNew()

to create a new Sales Order the Customers Name is cleared due to the fact that it is stored within the SalesOrder dataset. However, the address and contact information is not cleared as it is stored in the Customers dataset.

How do I synchronize these datasets so that Addnew on SalesOrder clears the displays for related datasets?
Something tells me that this is the place to use the BindingContextChanged event on your screen but I might be wrong. Im still wrapping my head around the BindingContext paradigm.

Joe Mamma
 
Back
Top