SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question 1.1

What interface do I need to implement into my custom web part, to make it a provider for "filter values" for a normal XsltListViewWebPart?

Answer - IWebPartParameters

"XSLT List View Web Part"
"Provider Connections - IWebPartTable, IWebPartRow
Consumer Connections - IWebPartParameters"

...from page 385 from "SharePoint 2010 Web Parts in Action", online pdf reader

Question 1.2

And how do I implement it correctly?

public class ProjectPhases : WebPart, IWebPartParameters 
    protected override void CreateChildControls()
        // Something
    public void GetParametersData (ParametersCallback callback)
        // ??
    public void SetConsumerSchema (PropertyDescriptorCollection schema)
        // ??
    public PropertyDescriptorCollection Schema
        // ??

Question 2.1

Does this Interface implement a method returning a CAML query?

Answer - I doubt it, because of the generic name of the interface, "IWebPartParameters"

Question 2.2

In what form do I send the data to the consuming XsltListViewWebPart which makes it filter the list?

The goal

This is how I want any XsltViewWebPart acting as a "consumer" to act, once my Custom Web Part acts as a "provider": Wanted end result

What I've learned so far:

I've understood that there are some filter Web Parts available in SharePoint Enterprise, sadly I'm working with Server Edition. These Web Parts reside inside the Microsoft.Office.Server.FilterControls.dll.

A method of importance i belive:
SetConnectedFilterProvider - Sets the IWebPartParameters instance from the filter provider to the DataFormWebPart. (Inherited from DataFormWebPart.) msdn XsltListViewWebPart Methods

Some links providing info about "Connected Web Parts"

share|improve this question

Since you already referring to (my) the SharePoint 2010 Web Parts in Action book, you have all your answers on page 349 "Connect using IWebPartParameters".

You basically work with a set of property descriptors that each has a type, name and value. This is only parameters you're sending from the provider to the consumer. The consumer tells what properties it can accept (type and name) and the provider says it can deliver properties (type and name) with values.

share|improve this answer
Thank you for your answer! I'm honored that the famous Wictor Wilén himself takes his time to answer my question. I'm continuing reading your book and trying to understand the plumbing so I can write the providing interface myself. – Tim Dec 2 '11 at 15:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.