在 DataGridView中添加一个统计行的技巧
Dim mTalbe As New DataTablemTalbe = 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# ,