question about datagrids and databinding -Am I making work for mys

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, bear with me. I've just spent the evening looking at tutorials and
samples and I am getting confused.

I have an extremely conventional set of order header/order detail tables,
the details bound to a header record by the usual order number.

What has me confused is this. I would like to create an order editing form
in which nothing is entered into the db until the content of the header and
at least one detail are settled.

Doing this with my usual methods would be relatively straightforward but I
can't help wondering if I'm making extra work for myself. The most likely
scenario, since I want to be able to both add and edit header/details, would
be to first programatically create a datatable and bind it to the grid. Then
once the header and at least one detail are defined, create a transaction,
insert the header, and then loop through the datatable, extracting the data
from each row to create each detail. Editing would be a similar process.

My background is this. I've made a great deal of use of the Microsoft
Application Data block and next to no use of data adapters directly. Indeed
for no reason I can quickly explain here, I generally avoid any binding of
objects directly to a database. It seems so much simpler to create a dataset
and just bind that to the datagrid and then do what ever is necessary
programatically, as far as db ops are concerned.

Given this, is there some sample I've overlooked? Nothing included with
Visual Studio seems particularly relevant right now.
 
Back
Top