Lo normal es que ese campo se complete sin necesidad de un boton, agregando el codigo al evento CellValueChanged de tu datagridview, algo asi
Código PHP:
If DataGridView1.Rows.Count > 1 Then
If e.ColumnIndex = 0 Then 'index del campo cantidad
DataGridView1.Rows(e.RowIndex).Cells("SubTotal").Value = DataGridView1.Rows(e.RowIndex).Cells("Cantidad").Value * DataGridView1.Rows(e.RowIndex).Cells("Precio").Value
ElseIf e.ColumnIndex = 1 Then 'index del campo precio
DataGridView1.Rows(e.RowIndex).Cells("SubTotal").Value = DataGridView1.Rows(e.RowIndex).Cells("Cantidad").Value * DataGridView1.Rows(e.RowIndex).Cells("Precio").Value
End If
End If
Pero si lo que quieres es hacerlo por un boton, agregas esto al evento click del boton
Código PHP:
For i As Integer = 0 To DataGridView1.Rows.Count - 2
DataGridView1.Rows(i).Cells("SubTotal").Value = DataGridView1.Rows(i).Cells("Cantidad").Value * DataGridView1.Rows(i).Cells("Precio").Value
Next