Change View of Sharepoint XSLT List View webpart in javascript

3.6k Views Asked by At

I have created a Sharepoint hosted app for Office 365. It has a page file "default.aspx". I have added an XSLTListViewWebpart on that page, referring a custom List I created within my APP project. I have a requirement that on a button click event, I need to change the View of the List displayed in the XSLTListViewWebpart. Since there is no server code within the APP, would this be possible in javascript? Or would it be possible to somehow change the query that the webpart uses?

1

There are 1 best solutions below

4
On

You can try to use Javascript object model to achieve this. Please see this article.