ali_2021
سه شنبه 19 خرداد 1388, 14:20 عصر
Color bg = Color.White;
foreach (DataGridViewRow dgvr in dataGridView.Rows)
{
DataGridViewCellStyle dgvcs = new DataGridViewCellStyle();
dgvcs.BackColor = bg;
foreach(DataGridViewCell dgvc in dgvr.Cells)
{
dgvc.Style = dgvcs;
}
bg = (bg == Color.White) ? Color.Yellow : Color.White;
}
منبع : www.utter.blogfa.com
foreach (DataGridViewRow dgvr in dataGridView.Rows)
{
DataGridViewCellStyle dgvcs = new DataGridViewCellStyle();
dgvcs.BackColor = bg;
foreach(DataGridViewCell dgvc in dgvr.Cells)
{
dgvc.Style = dgvcs;
}
bg = (bg == Color.White) ? Color.Yellow : Color.White;
}
منبع : www.utter.blogfa.com