dpanattoni
IS-IT--Management
I have a datagrid that allows the user to Add/Modify/Delete child records of a parent. The database format of the child record is:
Parent_Key
Item_Number
Child_Field#1
...
Child_Field#5
The fields that are displayed in the datagrid are Child_Fields#1 - #5.
When it comes time to do the update, I need to construct the SQL statement so that the appropriate child record is updated in the database. ie: UPDATE Child_Record Set Child_Field#1 = 'XXXX' where Parent_Key = 'xxxx' and Item_number = '2'.
My question is this. What is the best way to retrieve Item_number? I have tried putting it in as an invisible field, but I haven't found how to access it during the update. I also tried putting it into the grid as visible, but no updating allowed. This seems closer, but I don't know how to extract it's contents at update time.
Thanks for the help.
Parent_Key
Item_Number
Child_Field#1
...
Child_Field#5
The fields that are displayed in the datagrid are Child_Fields#1 - #5.
When it comes time to do the update, I need to construct the SQL statement so that the appropriate child record is updated in the database. ie: UPDATE Child_Record Set Child_Field#1 = 'XXXX' where Parent_Key = 'xxxx' and Item_number = '2'.
My question is this. What is the best way to retrieve Item_number? I have tried putting it in as an invisible field, but I haven't found how to access it during the update. I also tried putting it into the grid as visible, but no updating allowed. This seems closer, but I don't know how to extract it's contents at update time.
Thanks for the help.