Footer Format Problem
Hi,
I'm having a problem formatting datagrid footer values to a number. When I debug I can see that the value of grdTotals.Items.Item(i).Cells(n).Text is "1,903" which is the formatting that I'm trying to achieve but when I get past e.Item.Cells(n).Text = String.Format(x(n), "##,###") the value is 1903.
Thank you for any suggestions.
Richard
Dim x(n) As Integer
For i = 0 To grdTotals.Items.Count - 1
For n = 1 To grdTotals.Items.Item(i).Cells.Count - 1
x(n) += grdTotals.Items.Item(i).Cells(n).Text
e.Item.Cells(n).Text = String.Format(x(n), "##,###")
If Len(e.Item.Cells(n).Text) = 0 Then
e.Item.Cells(n).Text = "0"
End If
Next
Next
|