1

We're displaying a SharePoint 2010 list using a Standard View created via the browser. The items are shown in a table and the users would like a number shown for each row. The numbers column would be "sticky" based on the default view -- so a row's number would not change if the columns are sorted. The numbers should start with "1" and go down the rows in that order. This is probably possible with jQuery but not sure.

Your help is appreciated. Thanks.

1 Answer 1

4

Alex C!

You can customize xslt layout of view by using SharePoint Designer. You can define variable <xsl:variable name="ronwNumber">0</xsl:variable>, increace `<xsl:variable name="ronwNumber" select="$ronwNumber+1"/> it inside tag <xsl:foreach></xsl:foreach>that displays rows and add column to layout table <xsl:text><td><xsl:value-of select="$ronwNumber"/></td></xsl:text>. Don't forget about table header.

2
  • This doesn't seem to work :(
    – naijacoder
    Commented Aug 27, 2012 at 5:02
  • Hi @naijacoder! What's wrong? Do you see number?
    – IAfanasov
    Commented Aug 29, 2012 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.