This is a migrated thread and some comments may be shown as answers.

ForeColor - unknown entity 'color'

1 Answer 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 27 Oct 2015, 03:07 PM

I'm following the tutorial here to do some conditional styling on a radGrid.

http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/appearance-and-styling/conditional-formatting

But I am not able to use this:

dataBoundItem["Approved"].ForeColor = Color.Red;

 The visual studio message is "Unknown entity 'color'

and the display error message is:

"Compiler Error Message: CS0103: The name 'Color' does not exist in the current context"

What am I missing? Thanks!

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 27 Oct 2015, 04:42 PM
Hi Matt,

You need to include the System.Drawing namespace to resolve the issue:
using System.Drawing;

or:
dataBoundItem["Received"].ForeColor = System.Drawing.Color.Red;

Hope this helps.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or