Loading...

RE: Web Part to display a list across columns

RE: Web Part to display a list across columns

#5797
Anonymous
Anonymous
Participant

Thank you both for helping me come to this solution:

qListView web part

Display tab

Viewed Lists field:

<Lists>

<List SiteUrl=”.” ListName=”theList” />

</Lists>

Sort Fields field:

Title

Custom Display tab

Results Header field:

<table><th><td><b>Appraiser List</b></td></th>

<script type=’text/javascript’>var index = 0; var rowmax = 8;</script>

Results Body field:

<script type=’text/javascript’>

if (index == 0) {

index++;

document.write(“<tr>”);

} else if (index <= rowmax) {

document.write(“<td>”);

document.write(“<a href=/sites/Site_Collection/Site/Lists/theList/dispform.aspx?&ID=<%ID%>>”);

document.write(“<%Title%></a>”);

document.write(“</td>”);

index++;

} else {

index = 0;

document.write(“</tr>”);

}

</script>

Results Footer field:

</table>

Adjust the ‘rowmax’ value in the Results Header to match the number of desired columns.  The column width auto-adjusts and wraps the Titles within each cell if they end up too long.

Additionally, the documentation you mentioned can be found at: http://documents.quest.com/QB18575 (for the version I am using, at least).

There may still be a better, more dynamic way to do this, but I doubt it will end up this simple.