在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
http://blog.csdn.net/xht555/article/details/38685845 https://www.cnblogs.com/wuchao/archive/2012/12/25/2832744.html
IEnumerable<DataGridViewRow> enumerableList = this.dataGridView1.Rows.Cast<DataGridViewRow>();
//数组转成字符串 IEnumerable<DataGridViewRow> DataGridList = this.rcomdgv2.Rows.Cast<DataGridViewRow>();
//对应的数据赋值 IEnumerable<DataGridViewRow> DataGridList = this.rcomdgv2.Rows.Cast<DataGridViewRow>(); //求表格和 var TotalActualWeight = from p in enumerableList group p by p.Cells["out_barcode"].Value into g select new { TotalActual = g.Sum(p => p.Cells["weight"].Value.ObjToDecimal()) };
//去除重复 IEnumerable<DataGridViewRow> enumerableList = this.dataGridView1.Rows.Cast<DataGridViewRow>(); ///只会获得 Number 列的名称 var luo = enumerableList.GroupBy(x => x.Cells["Number"].Value).ToList();
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论