Filtering a SharePoint Data View – Part 3
Guest Author: David Severn
Following directly on from part 2 we will now hook up the two user interface controls.
Hover your mouse over the top right hand corner of the data view to display a small right facing arrow.

Press this to display the Common Data View Tasks menu.

Select Filter.
Click add new clause and select Category in the ‘field name’ drop down list.
Click on the * in the Value Field drop down to display.

Select create new parameter and make selections from the two drop down lists as follows:

Press OK.
This has associated the value selected in the drop down list with the parameter to be used to filter the value found in the category column in the todo list.
Press O.K again to close the filter editor.
Right Click on the drop down list and select Properties.
In the tag Properties task pane set Auto Post Back to True to cause the new selected value to be sent back to the server to filter the data view.

Save Changes and display the page.
Select different categories to show different to do items.


With a bit of planning, some useful user scenarios can be created with a very small amount of effort.
And no code!
Guest Author: David Severn
David Severn is a Developer specialising in ASP.Net and SharePoint related technologies. He holds various Microsoft certifications including MCTS for WSS Development and Moss configuration. He lives with his wife and three children in the west of Ireland.
- Filtering a SharePoint Data View - Part 1
- Filtering a SharePoint Data View - Part 2
- Filtering a SharePoint Data View - Part 3
Nice post, and clearly explained. Great job.
Thanks so much for this series. I’ve always wondered how to filter a data view through the end user interface.
I have a question: How do you show all items by default? I followed your steps and the default view shows the data view filtered by the first item in the category list. Is there a way to show all items from all categories by default?
Thanks for the tip. The MSDN article about this functionalty botched the drop-down list.
Is it possible to put a second datasource on there and have it filter the same dataview? For example, I would have a dropdown to sort by category but would also want to put a dropdown that sorts by letter (e.g. A-Z listing). Any details, assistance or pointing in the right direction would be appreciated. Great stuff!