Small help : total cost (column total) for dynamically added row

Small help : total cost (column total) for dynamically added row

Dear All


I want to sum cost 1+cost2 and and display in  field Total cost 



Test Group Test Name Ref.Val Unit Qty Rate Cost Qty x Rate
ref 001 unit 001
ref 001 unit 001
Add Row

when i add row
i need to know number of rows