J
Jason James
Hi,
I would like to do this:
Dim r As GridViewRow
Dim nTotal As Single = 0
For Each r In GridView1.Rows
If IsNumeric(r.Cells(2)) Then
nTotal += CType(r.Cells(2).Text, Single)
End If
Next
Label1.Text = "Total vouchers bought is " & nTotal.ToString
to sum the numbers in column 2 and place the total into Label1.
However, the rows collection doesn't appear to have any rows in it. It
does have rows and they are displayed.
Any ideas how I achieve this goal and in which event I should process
the rows?
Many thanks,
Jason.
I would like to do this:
Dim r As GridViewRow
Dim nTotal As Single = 0
For Each r In GridView1.Rows
If IsNumeric(r.Cells(2)) Then
nTotal += CType(r.Cells(2).Text, Single)
End If
Next
Label1.Text = "Total vouchers bought is " & nTotal.ToString
to sum the numbers in column 2 and place the total into Label1.
However, the rows collection doesn't appear to have any rows in it. It
does have rows and they are displayed.
Any ideas how I achieve this goal and in which event I should process
the rows?
Many thanks,
Jason.