on 2012 May 22 8:21 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
10 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.