我怎样才能改变一个排在GridView的DevExpress的背景色?
问题描述:
我有一个的DevExpress GridView控件在我的形式,我需要改变一些行颜色因一个布尔值。
I have a DevExpress GridView in my form and I need to change some rows color due to a boolean value.
那是什么让我改变属性行??
What is the property that allows me to change the backcolor of a row ??
答
您可以更改该行的颜色渐变中的 RowStyle $的背景色C $ C>事件处理程序:
You can change the row's color gradient in the RowStyle
event handler:
private void myGridView_RowStyle(object sender,
DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
{
e.Appearance.BackColor = Color.Green;
e.Appearance.BackColor2 = Color.LightGreen;
}
请参阅:的个别行和单元格