Anyone here knows how to accomplish this kind of rows using DevExpress GridView on WinForms?
4 Answers
You click on GridView and then click on Theme, you can choose from this.

- 119
- 2
- 9
-
Hi, thanks for your feedback but i ain't looking for the theme, i'm looking to change the row colors. – Derstine Jun 27 '16 at 04:01
I suggest you to go through documentation for the topic: Customizing Appearances of Individual Rows and Cells.
You can do this using various ways:
- Customizing Appearances
- Using the GridView.CustomDrawCell event
The GridView.RowStyle event can be handled to customize the appearance of individual rows in GridViews. To customize a specific cell's appearance, handle the GridView.RowCellStyle event instead. The GridView.RowStyle event fires before the GridView.RowCellStyle event.
Example:
using DevExpress.XtraGrid.Views.Grid;
private void gridView1_RowStyle(object sender,
DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) {
GridView View = sender as GridView;
if(e.RowHandle >= 0) {
string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["Category"]);
if(category == "Beverages") {
e.Appearance.BackColor = Color.Salmon;
e.Appearance.BackColor2 = Color.SeaShell;
}
}
}
References:
Changing Row Colours on DevExpress GridView
Hope this help..

- 1
- 1

- 18,017
- 2
- 42
- 75
Here is how you would do in a DataGridView control in forms. Should be similar I assume, it has been a while since I last used DevExpress. But you should go through the DevExpress' documentation, since all of the components are very well documented.
foreach (DataGridViewRow row in dgInformation.Rows)
{
if (some criteria here == 1234)
{
row.DefaultCellStyle.BackColor = Color.Goldenrod;
}
}

- 940
- 2
- 11
- 26
Try the following:
gridView.EnableAppearanceEvenRow = true;
Or:
gridView.EnableAppearanceOddRow = true;

- 1
- 2