总结:SharePoint Designer 2010 DVWP (3) -- DataFormWebPart -- Sort and Group

选中DataFormWebPart,然后点击Ribbon上的“Sort & Group”,选择要排序或分组的字段,再设置一下显示样式,最后根据需求自己调整XSLT就可以了。

统计当前分组:

<xsl:template name="dvt_1.groupheader0">

              ...

              <xsl:param name="nodeset" />

    ...

   

    <xsl:value-of select="count($nodeset/@LinkTitle)" />

 

</xsl:template>

 

 

统计所有:

<xsl:template name="dvt_1">

 <xsl:variable name="dvt_StyleName">Table</xsl:variable>

 <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>

 ...

 

   Total: <xsl:value-of select=" count($Rows/@Title)"/>

 

</xsl:template>

 

 

Help links:

http://www.endusersharepoint.com/2010/09/02/sharepoint-extending-the-dvwp-%E2%80%93-part-33-modifying-total-and-subtotal-row-layouts-in-dvwp/

http://www.endusersharepoint.com/2010/03/18/sharepoint-displayinig-calculated-column-sums-in-a-view-screencast/

你可能感兴趣的:(SharePoint)