DFWPs Behind the Scenes

Listing 22.4 shows an example of a DFWP in code view. The main tag to take note of is the <DataSources> tag, which includes the SPDataSource control and DataSourceMode parameter. The <SPDataSource> tag is important when working with DFWPs and configuring cross-list data lookups. For instance, if you want to retrieve all list items of type Announcements from within the current site collection, you can employ the SPDataSource CrossList method. See Chapter 24 for a thorough discussion on configuring the SPDataSource in DFWPs for cross-list data retrieval.

Listing 22.4 Partial DFWP shown in Code View

<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" AsyncRefresh="false"FrameType="None" NoDefaultStyle="TRUE" ViewFlag="8" ...

Get Microsoft® SharePoint® Designer 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.