Paul's profilePaul Galvin's SharePoint...BlogListsSkyDrive Tools Help

Blog


    November 25

    Quick and Easy: Create a Data View Web Part (DVWP)

    There is a wealth of great information on the WSS 3.0 Data View Web Part (DVWP) on the web from several sources.  However, I found it to be surprisingly difficult to find information on this first very basic step.  Here is another article in the "quick and easy" series to address it.

    Follow these steps to create a data view web part (DVWP).  They are based on an "Announcements" web part, but apply to most lists.

    1. Create an Announcements web part and add it to a site.
    2. Open the site in SharePoint Designer.
    3. Open the site's default.aspx.
    4. Select the Announcements web part and right-click. 
    5. From the context menu, select "Convert to XSLT Data View".

    SharePoint Designer notifies you that this site is now customized from its site definition. That's not necessarily bad, but there are important implications (performance, upgrade, others) which are beyond the scope of this little "Quick and Easy" entry.  To get more information on this subject, I recommend both books here as well as your favorite Internet search.

    Confirm that you did it correctly:

    1. Close and re-open the web browser (to avoid accidentally re-posting the original "add a new web part").
    2. Select the web part's arrow drop-down and choose "Modify Shared Web Part" from the menu.
    3. The tool panel opens to the right.
    4. The panel has changed from its usual set options to this:
      image
       

    At this point, modify the XSL to your heart's content.

     

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Paul Galvin has turned off comments on this page.
    Paul Galvinwrote:
    Mark, I do plan to write up a couple of entries on CQWP fairly soon.  I expect at least one to be a "quick and easy" approach to exactly that, adding additional columns.  Also, showing CQWP in a grid format (as opposed to the default search-style listing) and some other tricks that I think will benefit other folk.
     
    Thanks for taking time to comment.
     
    --Paul G
     
    Nov. 28
    Picture of Anonymous
    Mark Miller wrote:
    Paul - Very nice post. Is it possible that this technique might be used in the Content Query Web Part? Many people have asked how to show more columns when pulling in data in the CQWP, and I think this might be it... not OOTB, but still simple enough to be useful.
     
    Mark
    Nov. 25

    Trackbacks

    The trackback URL for this entry is:
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!395.trak
    Weblogs that reference this entry
    • None