Jump to content
Software FX Community
BestMark

Conditionally Formatting Cell Background and/or Font Colors

Recommended Posts

Is there a way to conditionally format the background color and/or font color in a cell? 

For example....

- when the cell value is negative, the cell background color is red (white font color)

- when the cell value is positive, the cell background color is green (white font color)

- when the value is 0, the cell background color is white, (black font color).

 

Share this post


Link to post
Share on other sites

Look under

FormattingDataValue

then look at e.field.datapath and e.datavalue the you can use

String

.Format("<span style=""color:red"">{0}</span>", e.FormattedValue)

 Hope that helps

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...