I have deployed the code in http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.communication.ifilterprovider.aspx. When I connect this webpart to a list webpart, for some reason in the next function, connectedPart is null. Why this is happening?
public override void PartCommunicationConnect(
string interfaceName,
WebPart connectedPart,
string connectedInterfaceName,
ConnectionRunAt runAt)
{
// Keep track of whether the Web Part is connected.
if (interfaceName == "MyFilterProviderInterface")
{
_connected = true;
_connectedWebPartTitle = SPEncode.HtmlEncode(connectedPart.Title);
}
}
And if IFilterProvider Interface is obsolete which one should I use? Is there some example like this one?