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

I have about 1000 items in a custom list. i want to retrieve 10 only from a certain position, (i know how to do this).

I also want to get the total in the list.

How would i do this? (this is for custom paging)

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Have you tried getting the list and using SPList.Items.Count?

There is also an SPList.ItemCount property that includes folders as items in the count...

share|improve this answer
    
This needs to be selected before the query limits the list. Afterwards it acts as an amount with the RowLimit as the maximum amount. –  Hugh Wood Nov 15 '12 at 17:02
    
@HughWood is this additional information or are you saying this isn't a valid answer? –  RJ Cuthbertson Nov 15 '12 at 18:42
    
Not at all, I am saying that I am putting a caveat on Item Count. If it wasn't valid I would of down voted. –  Hugh Wood Nov 16 '12 at 8:19
    
@HughWood definitely. I was just unsure where you were going with that. –  RJ Cuthbertson Nov 16 '12 at 14:18
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.