Applies to SharePoint 2013
Out of the several different filter webparts let’s try using a Text filter webpart
On a new non-webpart page created form designer add a dataview webpart and select a list
Select a Text Filter webpart
Change the filter name and Title name to something simple
We are going to create a filter on Lastname, the dataview webpart will display all the contact that contain this last name. High level strategry to achive this is to create a lastname parameter in DataView webpart, apply filtering based on lastname in the XSLT listview webpart and finally pass the value of this parameter from the list filter webpart. Lets start with creating a parameter in the xsltlistview webpart ,
Applied filter using this parameter
This will add the following CAML query to the Query section, before applying the filter it was only <Query/>
Now lets connect xslt listview webpart with text filter. With cursor in Contact List XSLTListview webpart click on ‘Add Connection’ and in the wizard select “Get Parameters From”, this basically means we are going to get the value of a Contact List parameter, the name of the parameter will be specified later in the wizard.
Hit on Next
Hit Next, select the text filter and select the action as send value to ,
Hit on Next to map the parameter of ContactsList (specified in the rt side of below image) to the name of the filter which is “Last Name” also( specified in left side).
finally hit on next and Finish
This basically adds the below spwebpartconnection to the page specifying the connection between the two webparts
Preview the page, type in the last name filter and you will see the values refresh in the XSLTListView in the bottom.
Check out my below posts on DataView Webpart, leave me a comment if you find them useful