The Quantity column is entered by the user and the rest of the cells are read-only.
The Subtotal column is Price*Quantity
The Discount column is Price*20%
The Total column is Subtotal-Discount
The TOTAL row is just the sum of the corresponding columns.
Each has a specific ID so that its easy to reference them. For example, all cells in the Quantity column would have the id "qty_"+item_name. And cells in the Subtotal column would have the id "subtot_"+itemname.
Now for my question, how do I go about doing the math? Is there a simpler way to do the addition and subtraction than by getting all the elements by ID and going through a for loop? Can I grab just the position of the cells and then go from there?
Thanks for your help.