动态绑定combobox
2015-08-07 11:14
351 查看
DataTable dt_Destination =
dt;
DataRow dr = dt_Destination.NewRow();
dr["MC002"] = "===請選擇==="; //插入一项
cmbDestination.DisplayMember = "MC002";
cmbDestination.ValueMember = "MC002";
dt_Destination.Rows.InsertAt(dr, 0); //设置插入的一项指定的位置
cmbDestination.DataSource = dt_Destination; //动态绑定数据
dt;
DataRow dr = dt_Destination.NewRow();
dr["MC002"] = "===請選擇==="; //插入一项
cmbDestination.DisplayMember = "MC002";
cmbDestination.ValueMember = "MC002";
dt_Destination.Rows.InsertAt(dr, 0); //设置插入的一项指定的位置
cmbDestination.DataSource = dt_Destination; //动态绑定数据
相关文章推荐
- java的环境配置问题
- crontab
- C++_Switch Statement
- 第一次使用ungetc
- 浅析linux中snapshots, blockcommit,blockpull
- bzoj3143: [Hnoi2013]游走
- rampaser
- Spring@Autowired注解与自动装配
- hdu 1008 Elevator
- LeetCode: Multiply Strings. Java
- arc 模式下 使用宏定义单例模式(gcd 实现单例模式)
- 获取两个经纬度之间的距离,返回值是米
- 如何在Caffe中配置每一个层的结构
- MySQL sql-mode
- java.util.regex.PatternSyntaxException
- 利用python内置函数,快速统计单词在文本中出现的次数
- eclipse连接mysql
- uva 10305 简单拓扑排序
- Sublime 在win上搭建C++环境
- ent0 en0 et0 专题总结