Code:
gridView.Rows[rowIndex].Cells["Calc"].Value=Convert.ToInt32(gridView.Rows[rowIndex].Cells["Price"].Value)*Convert.ToInt32(gridView.Rows[rowIndex].Cells["Quantity"].Value);
to make the calculation on the grid itself, the rowIndex is the variable i made up to represent the selectedIndex of the row. (CurrentRow.Index)

then during query time you can add gridView.Rows[rowIndex].Cells["Calc"].Value as a parameters.

or you can

Code:
int Price=Convert.ToInt32(gridView.Rows[rowIndex].Cells["Price"].Value)
int Quality=Convert.ToInt32(gridView.Rows[rowIndex].Cells["Quantity"].Value);
and add the parameter like this

Code:
SQLCommand insertCommand=new SqlCommand("INSERT INTO tblTable(Total) VALUES(@Total)",sqlConn);
insertCommand.Paramaters.AddWithValue("@Total",Price*Quality);