O'Reilly logo

Microsoft® Office SharePoint® Designer 2007 Bible by Vikram Kartik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.4. Working with the Conditional Formatting Task Pane

The Data Form Web Part, like its predecessor Front Page 2003, allows you to format rows of data based on conditions. You can apply formatting to rows in your data view when the data in the rows meets a certain criteria. You can also hide or show rows of data based on whether they match a particular condition. This is especially useful in situations when you need to highlight data in your presentations when certain conditions and requirements are met. This feature in SharePoint Designer is called conditional formatting.

Conditional formatting, like most of the formatting features of the Data Form Web Part, is also implemented by using the XSLT formatting. It doesn't mean to change how the data is retrieved from the data source but to apply XSLT to the data retrieved to show, hide, or apply formatting based on the conditions set. You use the familiar Filter Criteria dialog box to create conditions that when met apply the specified formatting to the matching rows of data.

You use the Conditional Formatting task pane to create conditional formatting conditions. As shown in Figure 17.35, the Conditional Formatting task pane by default shows the existing conditions that apply to the selected content on the Web page.

To create a new condition, follow these steps:

  1. Select the HTML component on the Web page on which you want to apply the formatting based on the condition. For example, you can select the <tr> tag in the data view if ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required