I have an input panel with several textboxes and a DBGrid. This is connected to binding source to 2 joined tables (a parent - child one-to-many on a RID field in both tables) This was originally developed to view entered records, but now the client wants to be able to edit all the data in the joined tables, including the RID fields. The first concern is if the RID gets changed in the textbox, the rows have to have the RID column changed after the textbox edit. The RID field is hidden in the grid.
Secondly, they also want the ability to add new records in this form as well. At this point, upon an add new row, the value of the RID textbox needs to be inserted into the hidden RID field in the grid for the first row, and each consecutive row added (there can be any number of rows) So basically, OnAddNew in the grid needs to set Column RID.Value = TextBoxRID.value. Now to add a twist, lets say the user enters the new RID in the textbox, then enters several rows in the Grid, and goes back and changes the Textbox RID, there needs to be a routine that will update the RID column fields in the Grid when the textbox change has been completed. I don't want to check/change on every keystroke in the textbox, but maybe on a lostfocus?
Keep in mind that these fields (textbox & grid) are bound to a dataset via a BindingSource and aTableAdapter.
Any help would be appreciated.