Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a DVWP of a list with multiple entries. I've inserted it into my site but what I want to achieve is a look like this:

Header1    Data1    Data2    Data3
Header2    Data1    Data2    Data3
Header3    Data1    Data2    Data3

Where Header is the list header, Data 1 is one item in the list, Data 2 is one item in the list and Data 3 is one item in the list.

Looking at the default layouts for 2007 sharepoint designer, it doesn't look like there is a way to do this. I also haven't found anything on google either.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You need to modify the XSLT generated to create your custom look.

Once you add your DVWP, SPD adds the XSLT to the page. If you switch to split view, you can click your DVWP, and the code block will be highlighted. Before you modify the XSL directly, there are a couple of things you can do to make it easier.

  1. Select the base layout that is closest to what you want, then start to edit the XSLT or..
  2. Use a list web part as the base, set the properties to get the 'look' as close to what you want, then convert it and continue to work on the XSLT.

Nothingbutsharepoint.com has quite a few articles on DVWP's, including this one on modifying layouts. I specifically recommend you go thru Marc Anderson's series "Unlocking the Mysteries of Data View Web Part XSL Tags"

share|improve this answer
    
Few days later but I think you're right in this solution. I worked up some psuedocode to do exactly what you're talking about. For those that come back to this thread, basically you're going to have to use dual xsl:foreach's in order to push each row out at a time. I'll post example psuedocode when I get a chance. –  Robert Oct 27 '11 at 13:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.