Solved

Simple Datagrid Conditional Formatting

Posted on 2010-08-18
4
1,089 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
ID: 33473017
0
 
LVL 27

Accepted Solution

by:
MikeToole earned 300 total points
ID: 33473457
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
ID: 33478724
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
ID: 33480130
Is your solution suitable for posting as sample code?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

895 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

15 Experts available now in Live!

Get 1:1 Help Now