int index = this.dg.CurrentRowIndex;
if(index < 0)
return;for(int i=0;i<comboBox1.Items.Count;i++)
{
this.comboBox1.Items.Add(this.dg.DataSource as DataSet).Tables[0].Columns[i].ColumnName);
}combobox.items.add();//添加选项
if(index < 0)
return;for(int i=0;i<comboBox1.Items.Count;i++)
{
this.comboBox1.Items.Add(this.dg.DataSource as DataSet).Tables[0].Columns[i].ColumnName);
}combobox.items.add();//添加选项
解决方案 »
- C#里没有 IP 控件啊?
- 求Sql语句。
- 。net页面如何使用word编辑框有没有控件
- radioButton和dataGridView
- c#有好的视频教程吗?
- C#(WinForm)中嵌入Excel
- 用C#实现的socket文件传输问题??急求:出现了传输过去的文件内容乱了,顺序错了,请高手帮我看看
- 图片读进byte[]。byte[]转化成String再转成byte[]。生成的图片有错误。
- C#获取单元格所在行的其他单元格内的内容
- Replace 替换指定位置的字符串
- 很多人说XML结合treeview可以提高性能,想了解一下在加载树,增删改节点时是怎么提高性能的,怎么保持XML与数据库的数据保持一致,逻辑是怎么
- 关于POST数据中含有&符号的解决方法?
{
this.comboBox1.Items.Add(datagird.Columns[i].HeadText);
}