combobox在Items添加了正常,缺料,品质,异常,暂缓,延期,完工内容,datagrid里面把status里面的内容通过
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{ if (e.RowIndex >= 0 && e.ColumnIndex == dataGridView1.Columns["Column15"].Index)
{
string precision = Convert.ToString(e.Value);
if (precision == "0")
{
e.Value = "正常";
}
e.FormattingApplied = true;
}
},现在要实现combobox查询Status,该怎么写代码.谢谢.(也就是怎么用combobox查询datagrid里的摸板列数据!!)
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{ if (e.RowIndex >= 0 && e.ColumnIndex == dataGridView1.Columns["Column15"].Index)
{
string precision = Convert.ToString(e.Value);
if (precision == "0")
{
e.Value = "正常";
}
e.FormattingApplied = true;
}
},现在要实现combobox查询Status,该怎么写代码.谢谢.(也就是怎么用combobox查询datagrid里的摸板列数据!!)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货