16.01.2013 Views

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

910 Part IX: Maintaining a Server in Windows SharePoint Services<br />

Grouping is accomplished by choosing a column to group by from the dropdown<br />

list. Groups can be exp<strong>and</strong>ed <strong>and</strong> collapsed. The Data View toolbar is<br />

enabled only at the top level of the Data View; subviews cannot have toolbars of<br />

their own.<br />

Setting Data View Record Options<br />

The Data View allows the author to control the number of records displayed. This is<br />

done under the Options tab of the View Styles dialog box, within the Record Sets<br />

category. The following three options are available, which appear as option buttons:<br />

■ Display all items. This option displays all records in the view on a single<br />

page.<br />

■ Display items in sets of size. This option displays records in sets of the<br />

specified size. Navigation buttons are provided at the bottom of the Data View,<br />

which allow the user to move to the next set of records (next), the previous set<br />

of records (previous), or the first set of records (reset).<br />

■ Limit the total number of items displayed to. This option is the same as<br />

the one just listed, except the number of records displayed is limited by the<br />

specified size. These are design-time settings; the end user cannot modify this<br />

in the browser.<br />

Conditional Formatting<br />

Data Views offer another powerful feature: the formatting applied to the various<br />

fields in the view can be driven by conditions on the data. For instance, this feature<br />

will allow us to underline the CompanyName for companies in a specific city. Data<br />

Views also allow conditional display; whether a field is displayed or not can be controlled<br />

by predicates on other data within the view. The following steps build on the<br />

DataView.aspx from the previous section.<br />

To add a conditional formatting to the Data View<br />

1. Ensure that the Data View Details task pane is displayed for the Data View.<br />

2. Select a Data View field value for the field we want to format on a given condition.<br />

In our example, the value for a CompanyName should be selected<br />

(such as “Great Lakes Food Market”).<br />

3. In the Manage view settings section at the top of the Data View Details task<br />

pane, the Conditional Formatting link will now be enabled. Click it to open<br />

the Conditional Formatting task pane. (See Figure 32-53.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!