When using a Data View WebPart to retrieve items from a list, The WebPart shows the results as 1-10, then next page is 11-20 and so on. It does not show whether is it 1-10 of 10 or of 10000.

Is there anyway that I can customize the Data View WebPart to show paging as 1-10 of X for example?

2 Answers 2


There is usually a RowCount variable already defined. If not you can define it like this:

<xsl:variable name="RowCount" select="count($Rows)" />

You can just output that variable where you need to in the xslt.

  • Will this show the TOTAL number of rows overall or just the number of rows in the current page? i.e. if we are having total of 100 records showing up in pages of 10 records, will this variable show 100 or just 10? Also are you using a web service data source or a list as data source? Jan 18, 2010 at 11:23

I have the same issue. But the answer given here will just show the count of the rows currently displayed in the view. Like if we have 10 rows displayed, than the count($Rows) only gives 10. But I want to display like "1-10 Out of 100". How to get the total count ? (I am using Sharepoint dataview webpart.)

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.