i have an datatable like this.
i am getting this data from an excel sheet and converted to datatable
id workedhours tfshours
1 3 2
2 5 5
3 .7 3
4 2 3.2
5 4.3 6.8
now i need the sum of the column workedhours and tfshours
how can i achive that is .there any builtin function to get the sum of teh column
i need the result like this in a new datatable
workedhours tfshours
15 20
any help would be greatly appreicated.
thank you
Create a new Datatable and use the datatable.compute methods.
The second parameter, filter, determines which rows are used in the expression, but you could just put “” to select all rows.