Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

XsltListViewWebPart query / filter

$
0
0

Hey everyone,

I am building a SharePoint-Hosted app with Visual Studio 2012 and using Javascript.

I have inserted a XsltListViewWebPart on my .aspx page to show my documents, but i need to only show the Documents for one account.

<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Documents" Title="loc:full"> <WebPartPages:XsltListViewWebPart
     runat="server" ListUrl="Lists/Documents" IsIncluded="True"  
     NoDefaultStyle="TRUE" Title="Documents"  
     PageType="PAGE_NORMALVIEW" Default="False" ViewContentTypeId="0x"> </WebPartPages:XsltListViewWebPart></WebPartPages:WebPartZone> 


So basically i need to do the same as with an CAML Query:

camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='AccountID' /><Value Type='Text'>" + AccountID + "</Value></Eq></Where></Query></View>");

The how can i do this in the XsltListViewWebPart, can i bind the CAMLQuery to the Webpart in any way or is there another option??

In forward, many thanks!


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>