Consider the following grid:

The parent is comprised of "Code" and "Type", and each parent can have 0 or more children. Each child is comprised of "Name" and "Type".
There's already a delete link to the left, which will delete the parent and its children. I'm struggling with the best way to present an inline Create function which would allow the user to create a parent and (optionally) add children, as well as the ability to add and delete children of existing parent records.
Any suggestions or examples?
