Reputation: 2084
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 ??
Upvotes: 3
Views: 13494
Reputation: 51634
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;
}
See: Customizing Appearances of Individual Rows and Cells
Upvotes: 7
Reputation: 33381
You must handle RowStyle or RowCellStyle event of GridView. Form more detail see http://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridViewsGridGridView_RowCellStyletopic and http://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridViewsGridGridView_RowStyletopic.
Upvotes: 0