c# - How To Convert The DataTable Column type? -


i trying implement:

dtgroupedby.compute("sum(power)",dvv.rowfilter);  

it results of error:

invalid usage of aggregate function sum() , type: string.

how convert column type ??

compute method supports expressions , support convert function use inside of expression.

for example, calculate sum of column like

mydatatable.compute("sum(convert(your column name, 'data type'))")  

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -