adi2015
Member
- Joined
- Mar 4, 2015
- Messages
- 17
- Programming Experience
- 3-5
Hi,
I am trying to create OrderHeader form which will contain subform "OrderDetail". User can input data about order header (date, customer etc), and in subform user will be able to input as much rows he likes (I plan to use datagrid view). You can see relationship between these tables bellow.

I am confused how to "connect" these two data sources on one form? I plan to create form based on OrderHeader table and then to drag&drop datagridview object which will contain source from table OrderDetail table. Even if I manage to connect them, do I have to modify main code for saving data that currently looks like this
Any help is appreciated and many thanks in advance!
Adi
I am trying to create OrderHeader form which will contain subform "OrderDetail". User can input data about order header (date, customer etc), and in subform user will be able to input as much rows he likes (I plan to use datagrid view). You can see relationship between these tables bellow.

I am confused how to "connect" these two data sources on one form? I plan to create form based on OrderHeader table and then to drag&drop datagridview object which will contain source from table OrderDetail table. Even if I manage to connect them, do I have to modify main code for saving data that currently looks like this
VB.NET:
Me.Validate()
Me.OrderHeaderBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.BazaDataSet)
Any help is appreciated and many thanks in advance!
Adi