Solved

Simple Datagrid Conditional Formatting

Posted on 2010-08-18
4
1,092 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Media.Imaging 1 18
how to check to see if datatable has headers or not 2 30
C# Gridview 1 33
VB.NET 2008 - SQL Timeout 9 25
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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…

831 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