如何在DevExpress GridView中更改行的背景颜色?

时间:2012-11-11 20:30:14

标签: c# winforms devexpress

我的表单中有一个DevExpress GridView,由于布尔值,我需要更改一些颜色。

允许我更改行的背景颜色的属性是什么?

2 个答案:

答案 0 :(得分:7)

您可以在RowStyle事件处理程序中更改行的颜色渐变:

private void myGridView_RowStyle(object sender,
                       DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) 
{
    e.Appearance.BackColor = Color.Green;
    e.Appearance.BackColor2 = Color.LightGreen;
}

请参阅:Customizing Appearances of Individual Rows and Cells

答案 1 :(得分:0)

相关问题