Ok, It's been a while since I posted last and I'm really hoping to get some general feedback/ideas here... My issue is this. I have a databound winform which updates a parent table. (Simple enough with a bindingsource) On that form I have a datagridview which is not bound to the parent table. This datagridview has checkboxes and based on the the items the user checks, a variable number of records get inserted into a child table (joined by the parent tables identity value).
What I want to do, is make this as seamless as possible. (ie. User clicks submit, the bound controls are updated creating a new record and the child rows are inserted....
Whats the best way to do this? I am guessing I can't use the child tables bindingsource (tied to the relationsship) since I don't have the ID propogated for the parent table yet?
In addition, the datagridview data does not relate directly to the child table that gets updated other than a unique ID that each row contains. (It basicaly displays domain values and ID's which I will be inserting into some history tables)
Should I create a temporary table that contains my rows for my child table (minus the ID column) then add the ID on submit and pass that whole temp table to the child table at that point? If anyone has a good simple example, I'd really appreciate the feedback. My code is currently very minimal as I've used primarily the bindingsource/table adapter to handle most everything.
What I want to do, is make this as seamless as possible. (ie. User clicks submit, the bound controls are updated creating a new record and the child rows are inserted....
Whats the best way to do this? I am guessing I can't use the child tables bindingsource (tied to the relationsship) since I don't have the ID propogated for the parent table yet?
In addition, the datagridview data does not relate directly to the child table that gets updated other than a unique ID that each row contains. (It basicaly displays domain values and ID's which I will be inserting into some history tables)
Should I create a temporary table that contains my rows for my child table (minus the ID column) then add the ID on submit and pass that whole temp table to the child table at that point? If anyone has a good simple example, I'd really appreciate the feedback. My code is currently very minimal as I've used primarily the bindingsource/table adapter to handle most everything.