Applies to SharePoint 2013
Here I am going to be using Empty Dataview webpart which is really DataFormWebpart.
Create a new Page in SharePoint Designer
Open in Advanced mode and attach a master page to it
Add the text for content holder
Insert a webpart zone and add 2 SharePoint List Filter webparts with in the zone.
Lets configure the 2 SharePoint list filter webparts to point to First Name and Last Name columns of the Contact List. This is done better in the Brower, so run the page by clicking the preview button
Edit the page in the browser and configure the list filter webparts like below
Configure the first filter to look like this
Configure the second Filter Webpart to point to Last name.
Now Drop an Empty DataView webpart
Then drop a datasource , In my case I am selecting the ContactsList as the datasource. Drop it between the datasource tags in the dataview.
Select the Column that you want from the DataSource Details view and insert them as Multi Item view.
The XSLT code is going to explode since this action adds a lot of XSLT to the page.
Now we have 2 SharePoint list filters and a dataview on the page. Let’s go ahead and connect them. Just like in the post before we are going to first create two parameters on the DataView one for First Name, another one for Last name. Then create a filter on the Dataview and pass values from these parameters to the firstname and the last name columns.
Applying filter on these parameters
Connecting the 2 filter webparts to these Dataview
Lets configure the filter webpart connections to pass values to the Dataview. This can be done both in the Browser and the Designer, I prefer to do it form the designer. BUT MAKE SURE YOU REFRESH THE PAGE IN THE DESIGNER , or it will have an older copy of the code i.e code from before the filter webparts are configured. Better to close and reopen the page in designer.
Clicking on the dataform webpart tag click on the “Add Connections” button
Map the Filter to the parameter which will receive its value
Hit on next and click on Finish.
Now do the Same for the Last Name i.e connect Last Name filter to Param_LastName parameter.
And now run the page and you will see that when you filter the first name and the last name the dataview below filters as well. And it does the filtering instantaneously.
Check out my below posts on DataView Webpart, leave me a comment if you find them useful