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

When using a Data view web part to retrieve items from a list, The web part 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 web part to show paging as 1-10 of X for example?

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
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? –  Emad Jan 18 '10 at 11:23
add comment

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.)

share|improve this answer
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.