Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
This doesn't seem to work :( –  naijacoder Aug 27 '12 at 5:02
    
Hi @naijacoder! What's wrong? Do you see number? –  IAfanasov Aug 29 '12 at 11:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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