Data View column headers missing
-
Wednesday, September 30, 2009 1:15 AMI created a link of two lists and a data view for it. Now I am struggling to get the Column Headers to show. Is there a particular setting I need to switch on? Or do I manually have to enter the XSL for the headers? If so, can somebody show me what I need to enter to make my column headers look the same as the ones for normal lists?
I noticed that if I go to Data View Properties and try to switch on "Enable sorting and filtering on column headers" the checkbox autopmatically gets unticked the moment I save the Data View Properties. Well, I can kind of understand that, seeing that there are no column headers in first place, but how do I add them so I can then sort on them?
Thanks for the info.- Moved by Mike Walsh FIN Wednesday, September 30, 2009 5:57 AM dvwp q (From:SharePoint - General Question and Answers and Discussion)
All Replies
-
Wednesday, September 30, 2009 5:57 AMData View Web Part questions go to Design/Customization.Moving this.
WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx -
Sunday, October 04, 2009 11:02 PMI'll give this post a boost now that it is in a new forum. :)
Can anybody point me to how to show the headers? Thanks. -
Monday, October 05, 2009 12:43 AM
Are you seeing headers ("Title", "Modified", etc.) without the sorting and filtering capabilities or are you seeing no headers at all?
M.
Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc -
Monday, October 05, 2009 5:26 AMNo headers at all.
-
Monday, October 05, 2009 11:50 AM
Well, with no headers at all, you've done something long the way to remove them. You have two options at this point:
* Recreate the DVWP
* Dive into the XSL and put in the headers
If you're interested in #2, it's not as hard as it may seem. Here's and example of a dvt_1 template with the headers:
<xsl:template name="dvt_1"> <xsl:variable name="dvt_StyleName">Table</xsl:variable> <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/> <table border="0" width="100%" cellpadding="2" cellspacing="0"> <tr valign="top"> <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"> <th class="ms-vh" width="1%" nowrap="nowrap"></th> </xsl:if> <th class="ms-vh" nowrap="nowrap">Name (for use in forms)</th> <th class="ms-vh" nowrap="nowrap">Title</th> <th class="ms-vh" nowrap="nowrap">Comments</th> <th class="ms-vh" nowrap="nowrap">URL</th> <th class="ms-vh" nowrap="nowrap">Content Type</th> </tr> <xsl:call-template name="dvt_1.body"> <xsl:with-param name="Rows" select="$Rows"/> </xsl:call-template> </table> </xsl:template>M.
Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc- Marked As Answer by Lambert Qin [秦磊]MVP Tuesday, October 06, 2009 5:10 AM

