Hi,
I am having a problem with adding new child records. The problem is linking these child records to their parent. I am binding my whd to a generic list of objects, each of which may have child objects.
In the child object, I have a property called ParentID, which allows me to link exisitng child rows/objects to the parent rows/objects. However, the property is empty for new rows. I cant think of anything I can utilize in the row_adding event for the child row.
Hi vimaljonn,
I can think of two approaches, one of which I have tried. The first is to have a column in your child grids for the parent Id value. You can hide this column and in the row adding client event, simply set it to the correct value. Then you should be fine.
Another option would be to handle the row adding server event and try adding another key/value pair to eventArgs.Values. This would contain your ParentId / val.
Let us know if you need more help.
regards,David Young
Hi David,
Thanks for your reply. I do have a column for the Parent ID in my child row. That is how I am able to update the child row. But for the new rows, this Parent ID is empty. It only has the ID for existing child rows. If you had tried the methods you described successfully, could you please outline the steps?
Best,
Marshal