开发者

Sum selected rows in datatable only?

开发者 https://www.devze.com 2023-01-10 21:09 出处:网络
I have a datatable which has an amount column & a status column. I want to sum only those rows who h开发者_高级运维ave status \'1\'. How to do this? I am summing the column via datatable Compute m

I have a datatable which has an amount column & a status column. I want to sum only those rows who h开发者_高级运维ave status '1'. How to do this? I am summing the column via datatable Compute method.


dataTable.Compute("sum(amount)", "status = 1")
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号