I want to sum two values inserted in two cells in a DataGridView.
This should work during run-time, user enters 2 values in specific cells in DGV.
When these values are entered, this program should automatically compute and output the result in another specific cell.
I already wrote a code but my code doesn't work like it supposed to work.
I put the code under DGV cellContentClick, this may be wrong, because I dont know where to put the code.
What is wrong with my code? Pls help.
Private Sub dgdTax_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgdTax.CellContentClick
Dim r2rm1 As Double
Dim r3rm1 As Double
r2rm1 = CDbl(dgdTax(1, 2).Value)
Catch e1 As Exception
r3rm1 = CDbl(dgdTax(1, 3).Value)
Catch e2 As Exception
dgdTax(1, 4).Value = r2rm1 + r3rm1