Solved

Simple Datagrid Conditional Formatting

Posted on 2010-08-18
4
1,101 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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