WinFrom 代码设置GridView单元格的背景色 GridView表格中显示2中数据:是/否1行 是 否 ...2行 是 是 ...3行 否 否 ......显示数据时,如果字段是"是",则单元格的背景色变成红色. 怎么写代码? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 获取事件,GridView.Rows[X].Cells[Y].Style.BackColor = Color.Red; for(int i=0;i<dataGridView.Cloumns.Count;i++){ if(i!=1||i!=2) continue; for(int j=0;i<dataGridView.RowCount;j++) { if(dataGridView.Rows[j].Cells[i].FormattedValue.ToString()=="是") dataGridView.Rows[j].Cells[i].Style.BackColor = Color.Red; }} 怎么抓取网页标签(按钮)下的网址 C#与扫雷 c#如何遍历华表Cell组件中的表,取出其中的值?????????????? DataTable问题 在windows application中,如何用鼠标移动datagrid的列? 那位高手能帮我把这行c#接口转换成java接口 再线等,非常感谢 string 问题 多线程下 dataset 的界面死锁问题 C#怎么用后台做个链接打开新网页 SQL in() 和base.Dispose(disposing)的问题求助。。。 C#模态对话框的拖拽问题 问csdn的开发人员
for(int i=0;i<dataGridView.Cloumns.Count;i++)
{
if(i!=1||i!=2)
continue;
for(int j=0;i<dataGridView.RowCount;j++)
{
if(dataGridView.Rows[j].Cells[i].FormattedValue.ToString()=="是")
dataGridView.Rows[j].Cells[i].Style.BackColor = Color.Red;
}
}