Solved

Simple Datagrid Conditional Formatting

Posted on 2010-08-18
4
1,087 Views
Last Modified: 2013-11-12
Hi all,

I have a SILVERLIGHT datagrid which is populated by a WCF data service and one of the fields within the table is a int value called STATUS, which has a value of 1,2,3 or 4

My question is how would I use conditional formatting so that once the datagrid is populated, each row has its background changed depending on the value of STATUS.

Any help would be much appreciated!

thanks

baz
0
Comment
Question by:baz86
  • 2
4 Comments
 
LVL 22

Assisted Solution

by:Mrunal
Mrunal earned 200 total points
Comment Utility
0
 
LVL 27

Accepted Solution

by:
MikeToole earned 300 total points
Comment Utility
If it were WPF I'd use data triggers, but I hear that they're not there - at least in Siverlight 3.0

Here are a couple of lisks that discuss options:
http://leeontech.wordpress.com/2008/06/08/silverlight-datagrid-issues/
http://blois.us/blog/2009/04/datatrigger-bindings-on-non.html

Hope this helps
0
 

Author Closing Comment

by:baz86
Comment Utility
Thank you MikeToole and mroonal for your links. Both were a great help thats why I have given both points but have given slightly more to MikeToole as i ended up using his solution.
0
 
LVL 27

Expert Comment

by:MikeToole
Comment Utility
Is your solution suitable for posting as sample code?
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now