cancel
Showing results for 
Search instead for 
Did you mean: 

Computation

Former Member
0 Kudos

Hi experts, just want to ask how can I get the total of my row if I have a 100 lines.

I'm using

For i As Integer = dgCOLUMNS.Rows.Count - 1 To 0 Step -1

Next

But it's so slow when computing. Is there any alternative?

I just want to duplicate the process of Purchased Order when computing the DocTotal.

Accepted Solutions (0)

Answers (1)

Answers (1)

Johan_H
Active Contributor
0 Kudos

Hi Gimo,

Try this:

Dim tot As Double = 0

For Each rw as DataGridViewRow In dgCOLUMNS.Rows

     tot += rw.Item("TheNameOfTheColumnThatYouWantToAddUp").Value

Next

If this is slow for 100 rows, you may have to look at your hardware specifications.

Regards,

Johan