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 an XsltListViewWebPart for which I programmatically intercept and replace the <Query> in it's XmlDefinition property. This works fine, and the list displays the correct data based on my queries. I'm running into a problem however, where the arrow buttons for paging through the data no longer work. When clicked, it fades as though the page is trying to do something, but it ultimately just refreshes the same data rather than going to the next page. (I've seen this question, but my BaseViewID is already 1).

What I'd like to do is use JavaScript to simply replace the broken arrow buttons with something custom. In order to do this, I need a way to programmatically tell the list (either on the client side via JavaScript, or on the server side via C#) which page of data it should be displaying.

Does anyone know a way to do this? Looking at the XsltListViewWebPart, I don't see any properties or XML that specifies which page should be displayed in the current request.

Thanks.

share|improve this question
add comment

1 Answer

The XsltListViewWebPart looks at query string parameters to help control paging. A good summary of this is here. By setting them via JavaScript on the client side and I was able to page through the data myself.

Note, that for this to work I had to basically rip out the link that SharePoint created in the filter button and apply it myself.

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.