OK, I have a master/detail form, and when a user clicks create I want to add a record to the form.
I am removing the old code that used to create a record in the database using SQL, and then "Fill" the table like a regular fetch.
My requirements are:
I wish to create a new row, and be attached to it in the form. i.e. the user can edit the data, and the record only gets created IF he saves and passes validation.
THERE IS NO DATAGRIDVIEW. There are 25 or so fields on the form (and a details datagridview), and I want the user to be able to add data until he chooses to save.
IF the user cancels, NO RECORDS should be created in Master or Detail.
so far, I have
purchase_OrderBindingSource.AddNew();
Now I need to add the key values, (which have no screen objects) to the row, and make sure the controls on the form are connected to the new (unsaved) row.
I don't see a way to add column data to a BindingSource. However, if I start typing purchase_Order_DetailBindingSource[]; it says I canget or set the list element and the specified index. This object seems to be a field, but I can't seem to access it by name, only by index, and I'd rather not do that, so if I change the query ever, I don't have to edit all these integer indexed fields.
I am hoping that someone has done this before, and I can piggyback off of your experience instead of spending 20 hours trying things until I stumble across the answer.
I'd rather live with false hope than with false despair.