If you insert a SharePoint Data View Web Part (DVWP) in a page using FrontPage or SharePoint Designer, you have some nice layout options. A lot of times I like to make a web gallery using picture library, but the DVWP has only a two-column layout. If you'd like to have more columns (for this example, let's make 4 columns), here's an easy way.
- When selecting layout of DVWP (in FrontPage select smart tag and click Style, in SharePoint Designer select Smart tag and select Change Layout), chose the two column layout:
- Next in source code look for mod 2 (you'll find 2 occurences)
- Replace the number 2 in both of those occurences with the number of columns you wish (for our example we'll make mod 4)
- At the end change or remove the width property of the table cell, which is set to 50%
- Using tag selector select theelement which is holding table with details - Delete or correct the "Width" attribute, because you have more columns and each can't have 50% of width.
And there you have it. You're in control of columns now :-)
Subscribe to: Post Comments (Atom)
2 comments:
This is a good start but what I want to do is have a table with the column headings down the left side and then the records in columns to the right.. how do I achieve this?
Awesome! Thanks for posting the information. You saved me time.
Post a Comment