I have a task to create a custom filter web part (CFWP) for standard List View web part (LVWP).
I decided to use a connection framework for this task and designed next concept:
LVWP is a provider of table data for CFWP. It's needed to agregate data by fields and show available filter values with list items counters. CFWP implements ITransformableFilterValues to be used as default filter for LVWP. So CFWP is a consumer and provider simultaneously. Here is a fragment of its code:
public class RefinerLikeFiltration : WebPart, ITransformableFilterValues { private IWebPartTable _tableProvider; [ConnectionConsumer("Table", AllowsMultipleConnections = true)] public void SetConnectionInterface(IWebPartTable provider) { _tableProvider = provider; } [ConnectionProvider("Selected Field Value", "ITransformableFilterValues", AllowsMultipleConnections = true)] public ITransformableFilterValues SetConnectionInterface() { return this; } ... } But when I try to connect this CFWP to single LVWP I can't use both connections simultaneously, only one of them at one time. And I get a next text in tooltip when one connection is established and trying to establish second: "A Web Part can only be connected to another Web Part through one connection type. Each connection can have only one connection type.". I understand this as I can't use two types of connection in one time between two web parts.
So please give me a best solution how to resolve it.
BTW I thought about third web part in this chain, that will be an intermediate web part as consumer of CFWP and provider for LVWP and will transfer filter value. How you think about this approach? Thanks in advance.