Código:
gracias Private Sub FACTURADataGridView_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles FACTURADataGridView.CellEndEdit Dim row As DataGridViewRow = FACTURADataGridView.Rows(e.RowIndex) If CBool(row.Cells("CANTIDAD").Value) Then Dim cantidad As Decimal = CDec(row.Cells("CANTIDAD").Value) Dim precio As Decimal = CDec(row.Cells("PRECIO_DE_VENTA").Value) Dim iva As Decimal = CDec(row.Cells("IVA").Value) Dim suma, i_va, b_impo, tot As Double row.Cells("TOTAL").Value = (cantidad * precio) suma = (cantidad * precio) SUMATextBox.Text = Format(suma, "$ #,##0.00") i_va = (Val(suma) * iva) / 100 IVATextBox.Text = Format(i_va, "$ #,##0.00") b_impo = Val(suma) - Val(i_va) BASE_IMPONIBLETextBox.Text = Format(b_impo, "$ #,##0.00") tot = Val(b_impo) + Val(i_va) TOTALTextBox.Text = Format(tot, "$ #,##0.00") End If End Sub