Show data in grid when submit doc

I have created one parent doc,
when i submit this doc i want to add some entries in child table and show in grid(non editable) on parent doc
when i cancel submitted doc delete particular entries from child table

any idea to do this??

Hi you have to edit this in your