Add together 2 DataGridView Cells (SUM)

Hi,

I am trying to add together (SUM) two cells in my datagridview. For this example both my cells contain "45" ...I am trying the code below, but my result is "4545" instead of "90". How can I go about getting the sum of these two cells? I am not using a Dataset behind this datagridview. Thanks!

Total = (Me.DataGridView1.Rows(0).Cells(10).Value.ToString + Me.DataGridView1.Rows(1).Cells(10).Value.ToString)
kasowitzAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
You are not adding values, but concatenating strings--don't use the ToString.

Bob
0
 
kasowitzAuthor Commented:
Perfect, Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.