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
Post a Comment