devexpress gridcontrol如何遍历每一行
2024-09-04 11:34:15
List<Medicine> medicinelist = new List<Medicine>();
foreach (GridViewRow row in GridView1.Rows)
{
if (row.Cells[0].Value != null && (bool)row.Cells[0].Value == true)
{
Medicine medicine = new Medicine();
medicine.Hiscode = row.Cells[1].FormattedValue.ToString();
medicine.Hisname = row.Cells[2].FormattedValue.ToString();
medicine.Hisscalctype = row.Cells[3].FormattedValue.ToString();
medicine.Hisspec = row.Cells[4].FormattedValue.ToString();
medicine.Hisunits = row.Cells[5].FormattedValue.ToString();
medicine.IsMedTre = true;
medicinelist.Add(medicine);
}
}
最新文章
- win8下IE10的鼠标mouse事件响应错误BUG
- C# Enum Name String Description之间的相互转换
- [原创]python之socket-ftp
- 再谈Jquery Ajax方法传递到action 【转载】
- wait、notify、notifyAll和Condition
- jQuery中.parent和.parents的区别
- Telerik XML 数据源绑定的问题
- [转] ArcGIS engine中气泡标注的添加、修改
- PeopleReady--办公学习类App产品
- nuget pack 时不包含依赖包(而不是引用项目的dll,区别于IncludeReferencedProjects)
- 无锁同步-C++11之Atomic和CAS
- zoj 1108 FatMouse's Speed 基础dp
- 【python】字符串变量赋值时字符串可用单或双引号
- SSH实现登陆拦截器
- __x__(32)0908第五天__Photoshop的基本操作
- angular2监听页面大小变化
- 深入了解IOC
- 8个超实用的jQuery插件应用
- CentOS7使用yum命令安装Java1.8
- mysql cast