Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to add a column to an XSLT Data View that counts the lines in that Data View in Expression Web, in SharePoint Designer 2007, or in FrontPage 2003


View products that this article applies to.

Summary

This article describes how to insert a column in an XSLT Data View that counts the number of records in that Data View.

↑ Back to the top


More information

When you insert a Data View Web Part, you can add a column to the table and have it display a running count of records in your XSLT Data View. To add a column to your XSLT Data View, Follow these steps:
  1. Put the insertion point inside any table cell that contains XML data.
  2. On the Table menu, point to Insert, and then click Rows or Columns.
  3. Click Columns, and then click OK.
  4. Put the insertion point inside one of the new table cells that you created in the same row as the data that you want to work with.

    Do not use the header row of the table for this purpose.
  5. Click the down arrow next to the <td> button on the Quick Tag Selector tool bar.
  6. Click Insert HTML.
  7. Replace "<>" with <xsl:number/>.
  8. Click the green checkmark to approve the change.
You will now have a value in each row that indicates the number of records in the Data View.

↑ Back to the top


Keywords: KB831094, kbhowto, kbweb, kbxml, kbwebpublishing, kbview

↑ Back to the top

Article Info
Article ID : 831094
Revision : 6
Created on : 6/4/2007
Published on : 6/4/2007
Exists online : False
Views : 353