Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# DevExpress
I am getting this error while using appearance setting to color a cell
'DevExpress.XtraGrid.StyleFormatCondition' does not contain a definition for 'Appearance'
this the code that i'm trying to use, please help
private void gridView3_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
    GridView View = sender as GridView;
    if (e.Column.FieldName == "First Name" &&
        string.IsNullOrEmpty(View.GetRowCellDisplayText(e.RowHandle, e.Column)))
        e.Appearance.BackColor = Color.DeepSkyBlue;
Posted 5-Feb-13 21:58pm
Edited 6-Feb-13 3:38am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use like the following:
e.Row.Cells[0].BackColor = Color.Red;
in place of
e.Appearance.BackColor = Color.DeepSkyBlue;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web02 | 2.8.150302.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100