小宋

song_xiaopeng@126.com

导航

2013年4月28日 #

GridView求整行数据的相加和

摘要: 今天本来想求列的和,没想到阴差阳错的把行的和搞出来了,先把求行的和贴出来 随后再贴列的和。table = doe.GetCommodity_Retail_List_dtl(); //------------------------------------------------------------// table.Columns.Add("Sum", typeof(Int32)); //增加列 int sum = 0; foreach (DataRow dr in table.Rows) //循环计算综合 { if (dr["price"].ToSt 阅读全文

posted @ 2013-04-28 10:22 _小宋 阅读(271) 评论(0) 推荐(0) 编辑