08.08.2017 Views

designer

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

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

144 Chapter 5 Working with Data Views<br />

The XSLT List View (XLV) Web Part you created in Chapter 3, “Working with Lists and<br />

Libraries” is similar to a Data View. Therefore, many of the techniques described in this<br />

chapter can be used for either the XLV Web Part or a Data View.<br />

In this chapter, using lists and libraries as a data source, you will create and modify Data<br />

Views. You will format the data according to specific criteria defined by the metadata<br />

and also work with the XSLT. You will also learn how to deploy the Web Parts.<br />

Tip The XSLT List View (XLV) Web Part is very similar to the DVWP. The details in this chapter<br />

can be used to customize that Web Part, too.<br />

Practice Files Before you can use the practice files provided for this chapter, you need<br />

to install them from the book’s companion Web site. For more information about<br />

practice files, see “Using the Practice Files” on page xxiii.<br />

Creating a Data View<br />

The Data View is a very flexible Web Part that you can create only by using SharePoint<br />

Designer. Like other Web Parts, a Data View follows these rules:<br />

●●<br />

●●<br />

●●<br />

●●<br />

●●<br />

It can be placed inside and outside EmbeddedFormField controls or Web Part zones.<br />

It has standard properties shared by all Web Parts, such as Title, Height, Width, and<br />

Frame State.<br />

Depending on the settings of the Web Part zone properties, a Data View can be<br />

relocated to other Web Part zones by using the browser.<br />

Web Part properties can be accessed through the browser’s Web Part tool pane.<br />

When inside a Web Part zone, a Data View supports personal and shared views.<br />

Additionally, you can edit the XSLT and the parameters passed to the XSLT without needing<br />

to open the page in SharePoint Designer.<br />

The Data View and the XLV Web Part are very similar in their functionality. The XLV Web<br />

Part is used to display and modify content stored in SharePoint lists and libraries and can<br />

be created by using the browser or SharePoint Designer. The XLV Web Part is based on list<br />

views and can easily be modified in the browser or configured to use an XSLT. Data Views<br />

can be used to display and modify content in data sources, including lists and libraries.<br />

Like the XLV Web Part, a Data View uses XSLT to present data and can be modified<br />

or deleted by using the browser. However a Data View can only be created by using<br />

SharePoint Designer, and unlike SharePoint Designer, the browser provides little help in<br />

writing XSLT.

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

Saved successfully!

Ooh no, something went wrong!