Thursday, 17 June 2010

XLVWP - Filtering the xslt List View Web Part Series

Overview: Xslt List View (XLV) Web Part is widely used in SP 2010. This series of posts shows how to use this Web Part. Various connected web parts can be used to filter the XLVWP such as a List Filter Web Part.

Filtering: The filtering web parts provides a good way to filter data in the XLVWP. Using Connected Web Parts it is easy to filter the data you wish to retrieve. Below is the setup of 2 List View Web parts that are used to filter depending on the selected data.

Presentation: SPD 2010 provides a good tool for customising the presentation of the XLV WP. Additionally you can uncouple the default shared XSLT and provide your own customised xslt.

Also see:XSLT List View Web Part (XLV):


Paul Beck said...

QU: I love the functionality the Web Part filters give, but how do you handle the “ALL” case? Say, I have a list of statuses and a date range. I’m using two date filter web parts to handle the date range and that works great. But, I use a list filter web part for the statuses but I’ve only been able to filter by ONE status. I need the ability to show “ALL” statuses in combination with a date range. I used to be able to tweak the code in designer and handle the “ALL” through xslt, but now it looks like the filtering is done at a different level and is handled by the CAML syntax.

Ans: The XLVWP is working as the consumer web part. The list filter web part is the provider web part. Your limitation is the list filter web part that you are using to filter by status. I believe you have a “None” option that will work like the “All” functionality you are looking for. My main issue with using the list view web part is that it’s pretty fixed. You can play around with the web part and other provider web parts for selection to get your desired functionality but I would write a new provider web part. If you don’t have a developer and don’t want to write custom consider using a 3rd part filter such as from Bamboo solutions.

Bamboo solutions are good web parts however, it’s pretty expensive if you only need it for this 1 simple problem. Still cheaper than building your own web part and it’s pretty flexible.

Post a Comment