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.

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

More Info For more information about working with Web Parts in SharePoint<br />

<strong>Products</strong> <strong>and</strong> <strong>Technologies</strong>, see Chapter 31, “Working with Web Parts.” For<br />

more information about using Visual Studio .NET to create Web Parts, see<br />

Chapter 37, “Using Visual Studio .NET to Create Web Parts.”<br />

Grouping, Filtering, <strong>and</strong> Sorting<br />

In the previous section, we examined how the Data View toolbar can be used to<br />

group, filter, <strong>and</strong> sort the data displayed. This was performed at run time in the<br />

browser by the end user. The author might want to perform similar operations at<br />

design time.<br />

Conceptually, when a filter condition is applied to a Data View at run time<br />

using the Data View toolbar, it affects only the presentation of the data; the Data<br />

View itself contains the entire set of records. When a Data View is filtered at design<br />

time, however, the filter is actually limiting what records are available in the Data<br />

View. Similar comments apply to design time vs. run time sorting <strong>and</strong> grouping.<br />

In this section, we examine how Data Views can be filtered, sorted, <strong>and</strong><br />

grouped at design time. These operations can be performed under the Manage View<br />

Settings category of the Data View Details task pane.<br />

We want the Data View to contain records for companies whose names start<br />

with an “L”. These records should be sorted by the Company Name field, <strong>and</strong><br />

they should also be grouped by the same field. The following steps build on the<br />

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

To group, filter, <strong>and</strong> sort the data displayed at design time<br />

1. Open DataView.aspx in FrontPage 2003 Design view.<br />

2. Ensure the Data View Details task pane is displayed. If it is not, you can display<br />

it by right-clicking anywhere in the Data View <strong>and</strong> choosing Data View Properties<br />

in the pop-up menu.<br />

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

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

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

4. In the Data View Details task pane, click Filter under the Manage view settings<br />

category to open the Filter Criteria dialog box. (See Figure 32-44 earlier<br />

in the chapter.) Note that the Data View filter defaults to the filter originally created<br />

for the Customers on the Northwind data source.<br />

5. Click the Click here to add a new clause gray bar, choose CompanyName<br />

from the Field Name drop-down list, change the Comparison value to Begins<br />

With, <strong>and</strong> type the text L into the Value text box. Click the OK button to apply<br />

the criteria.

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

Saved successfully!

Ooh no, something went wrong!