populate defaul property via javeascript

When i create a new item via a relationship called Subcontract, there is a property called MASTER_DID on subcontact which is datatype item as well, when the user selects a MASTER_DID the owner of MASTER_DID  should auto populate with the owner of Subcontract. This needs to all happen on the grid. How can i achieve that via client event

Parents Reply Children