[C#] 关于控件DataGridView的使用问题。 我手动在datagridview上添加了几个列其中有个combobox列,但是我不知道该怎么给这列的单元格(combobox)动态赋值。知道的大虾教小弟一下,谢啦。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 今天有人问过了http://topic.csdn.net/u/20100509/12/04a5426a-7de4-4577-9f6d-cd59885641e8.html 我的不是绑定数据库的数据我动态向里面加值。我在属性里面改不行。定义datagridviewcomboboxcell也不行 ServiceController[] services = ServiceController.GetServices(); int i = 0; foreach (ServiceController service in services) { dataGridView_test.Rows.Add(1); dataGridView_test.Rows[i].Cells[0].Value = service.DisplayName; DataGridViewComboBoxCell c = (DataGridViewComboBoxCell)dataGridView_test.Rows[i].Cells[1]; c.Items.Add("stop"); c.Items.Add("manual"); c.Items.Add("auto"); i++; } 急!!……报表设计问题!! short 范围问题 求足球彩票缩水原理或原码~~(比如:如何进行14保13) 求C#关闭开启端口的类,对象,方法或属性 菜鸟求助~~ winform开发 本地文件夹上传到服务器 ,求代码 只学c# 语言, WinForm控件, ado.net,水晶报表,能找到工作吗? 关于控制台数组的问题 面试经历 请问如何用C#写屏保程序,怎么样利用realplay的控件播放rm等格式的文件? 小菜急用 C# winform里,dataGridView选中行自动到下一行
http://topic.csdn.net/u/20100509/12/04a5426a-7de4-4577-9f6d-cd59885641e8.html
我的不是绑定数据库的数据
我动态向里面加值。我在属性里面改不行。定义datagridviewcomboboxcell也不行
int i = 0;
foreach (ServiceController service in services)
{
dataGridView_test.Rows.Add(1);
dataGridView_test.Rows[i].Cells[0].Value = service.DisplayName;
DataGridViewComboBoxCell c = (DataGridViewComboBoxCell)dataGridView_test.Rows[i].Cells[1];
c.Items.Add("stop");
c.Items.Add("manual");
c.Items.Add("auto");
i++;
}