Insert a DataView Web Part on a Page

So let’s get started with the basics:

  1. In SharePoint Designer (SPD), click <File> and choose <Open Site>.  Paste the full URL of your SharePoint site, such as http://sharepoint/sites/teamsite
  2. Click <Open>
    You can see that the left side of the screen shows the folder structure of your site.  Each document library is a folder, and all of the site’s lists live under the “Lists” folder.
  3. Now, in SPD, on the left side, navigate to the new web part page by clicking on the name of the document library from step 2.  The contents of that library will be displayed in the main work area in the middle of the SPD screen.  If you don’t see your new file, click the F5 key to refresh the list.
  4. Double-click the name of the new file to open it.
    Now, it’s time to start picking a data source to insert a data view web part.  You see the web part zones displayed on the page, and each zone says “click to insert a web part”.  It’s important at this point, that you pick a web part zone, and click <Click to insert a web part>. If a zone is not clicked on, a web part that’s inserted could end up on some random spot on the page.
  5. Click the <Data View> menu at the top of the screen, and choose <Insert Data View…>. Since this initial article is really just to show you around in the DVWP, we’re not going to do anything fancy.  We’ll just insert a regular SharePoint list as our data view.  See, that now on the right side of the screen, there is a “Data Source Library” pane.  The following are types of sources that you can get data from:
  • SharePoint Lists
  • SharePoint Libraries
  • Database Connections
  • XML files
  • Server-side scripts
  • XML Web services
  • Linked Sources

For Example

  1. Let’s grab some data that’s in a list on the site.  In the “SharePoint Lists” section, pick a list (preferably one with some data in it).  Click the drop-down box on that list name, and choose <Show Data>.
  2. Now, in the pane on the right side of the screen, instead of the “Data Source Library” tab, you’ll see the “Data Source Details” tab, that shows the details of the source that was just selected.  This means, that all of the fields in the list are displayed.  There are even some extra fields listed there, that are usually hidden from views.  While holding your CTRL key down, click on three or four field names to select them.
  3. Click <Insert Selected Fields As…> right above those field names.  Choose <Multiple Item View>. In various articles of this series, I’ll go over some of these other options, but this one is the most commonly used.
  4. When the DVWP is first inserted, the “Common Data View Tasks” menu is automatically displayed.
    Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s