2

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;
    }
1

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;
}
  • 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
-1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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