Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have twwo webparts, one consumer and one producer. Consumer WebPart takes various ITransformableFilterValues connections. And Producer WebPart generates one ITransformableFilterValues connection.

Now, I need to send another filter field to the Consumer WebPart. I know consumer it is going to manage it well, but I don't know how to generate two different ITransformableFilterValues connections from the Producer WebPart. Could you help me?

The code I have to generate one connection is the next:

    public System.Collections.ObjectModel.ReadOnlyCollection<string> ParameterValues
    {
        get
        {

            string[] values = new string[] { fieldToSend };
            return new ReadOnlyCollection<string>(values);
        }
    }

    [ConnectionProvider("People Picker Filter", "ITransformableFilterValues", AllowsMultipleConnections = true)]
    public ITransformableFilterValues SetConnectionInterface()
    {
        return this;
    }
share|improve this question
add comment

2 Answers 2

Create two parameters in the class and add another method, like such:

string test1;
string test2;

[ConnectionProvider("People Picker Filter1", "ITransformableFilterValues", AllowsMultipleConnections = true)]
public ITransformableFilterValues SetConnectionInterface()
{
    return test1;
}

[ConnectionProvider("People Picker Filter2", "ITransformableFilterValues", AllowsMultipleConnections = true)]
public ITransformableFilterValues SetConnectionInterface2()
{
    return test2;
}
share|improve this answer
    
Yes it works, but I think it is not possible to create more than one connection between two webparts –  Bargant Nov 17 '11 at 10:32
add comment
up vote -1 down vote accepted

It is not possible to create more than one connection between two webparts...

share|improve this answer
add comment

Your Answer

 
discard

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.