在GridView中用事件RowStyle
private void gridView1_RowStyle(object sender, RowStyleEventArgs e)
{
//例如,行号3的颜色变更
if (e.RowHandle==3)
{
e.Appearance.BackColor = Color.Green;
e.Appearance.BackColor2 = Color.LightGreen;
}
}
在GridView中用事件RowStyle
private void gridView1_RowStyle(object sender, RowStyleEventArgs e)
{
//例如,行号3的颜色变更
if (e.RowHandle==3)
{
e.Appearance.BackColor = Color.Green;
e.Appearance.BackColor2 = Color.LightGreen;
}
}