I need to consume a value passed by the default sharepoint filter webpart. I don't see how a custom sharepoint webpart can establish a connect and get data. Is this even possible?
Updated
The provider WebPart is a default SharePoint List Filter WebPart. The consumer WebPart is a custom WebPart
This is the code I came up with, but the "connections" option is still greyed out on the SharePoint page. On the page, I have a SharePoint List Filter WebPart and my CustomPageViewer WebPart.
namespace PageViewerWithConnections.CustomPageViewer
{
[ToolboxItemAttribute(false)]
public class CustomPageViewer : System.Web.UI.WebControls.WebParts.WebPart
{
IFilterValues _filterVals;
[ConnectionConsumer("Consumer connection", "Consumer param")]
public void ConsumeFilter(IFilterValues filterValues)
{
_filterVals = filterValues;
}
Microsoft.SharePoint.WebPartPages.PageViewerWebPart objPageViewer;
protected override void CreateChildControls()
{
}
}
}
Reason's for this approach My goal is to set a different URL to the page viewer Web Part based on the value I get from a SharePoint List Filter Web Part. It seems that the SharePoint List Filter WebPart cannot send data to a Page Viewer WebPart.