Posts

Showing posts from June, 2011

Conditional Formatting of List Views for SharePoint 2010 – Changing the Font Colour

Image
There are often times when it's useful to draw attention to particular items in a SharePoint list or library. For example, you might want to highlight overdue tasks, colour-code items according to priority, or draw attention to undesirable information. In other words, you want to apply conditional formatting based on field values. Now, as you probably know, SharePoint 2010 uses XSLT-based list views by default. By editing the XSLT for a list view you can apply all manner of rules and conditional formatting. Even better, SharePoint Designer 2010 includes some built-in tools that will figure out the XSLT for you. In the List View Tools tab group, on the Options tab, there's a handy dropdown menu:

In most cases, you're probably going to want to apply conditional formatting by row. First you set your conditions:

Then you choose the styles you want to apply when the conditions are met.

When you've set your style, SharePoint Designer modifies the XSLT so that your formattin…