title: How to sum columns in a dataTable?
body: <p>How can I get a sum for all the columns in a datatable? Say I had the following table. How can I calculate the "total" row? It should be easy to add total row to a datatable.</p>
  
  <pre><code>         Columns    hits     uniques    sigups, etc...
  Rows                  
  1                      12         1         23
  2                       1         0          5
  3                       6         2          9
  
  
  total                  19          3        37
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>I ended up with this. It was the only thing I could get to work.</p>
  
  <pre><code> For Each col As DataColumn In TotalsTable.Columns    
      If col.DataType.Name = "DateTime" Then
              count = count + 1
                  Continue For
          End If
  
          Dim colTotal As Double = 0
          Dim value As Double
  
          For Each row As DataRow In TotalsTable.Rows
              If Double.TryParse(row(col), value) Then
                      colTotal += Double.Parse(row(col))
                      End If
          Next
  
      totalRow(count) = colTotal
          count = count + 1
  
    Next
  </code></pre>