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.


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"

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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