当前位置:编程学习 > C#/ASP.NET >>

在 DataGridView中添加一个统计行的技巧

Dim mTalbe As New DataTable 
mTalbe = mBl.GetList(pstrSql).Tables(0) 
 
Dim dr As DataRow = mTalbe.NewRow 
dr.Item(0) = mTalbe.Rows.Count 
dr.Item(9) = mTalbe.Compute("sum(毛重)", True) 
dr.Item(10) = mTalbe.Compute("sum(皮重)", True) 
dr.Item(11) = mTalbe.Compute("sum(净重)", True) 
mTalbe.Rows.Add(dr) 
 
DataGridView1.DataSource = mTalbe 

摘自 wl58796351的专栏
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,