1

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.

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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