navidiran
دوشنبه 03 آبان 1389, 10:39 صبح
سلام. می خوام یک ستون از دیتاگریدم رو رنگی نشون بدم. میشه یکی بگه این کدی که نوشتم کجاش ایراد داره که کار نمی کنه؟
foreach (DataGridViewColumn col1 in dataGridView1.Columns)
{
if (col1.HeaderText.ToString().Trim() == "") { col1.InheritedStyle.BackColor = Color.Red; }
}
foreach (DataGridViewColumn col1 in dataGridView1.Columns)
{
if (col1.HeaderText.ToString().Trim() == "") { col1.InheritedStyle.BackColor = Color.Red; }
}