ClearFilterEventHandler delegate

NOTE: This API is now obsolete.

Represents the method that will handle the ClearFilter event fired by a Web Part that implements the IFilterProvider interface.

Namespace:  Microsoft.SharePoint.WebPartPages.Communication
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
public delegate void ClearFilterEventHandler(
	Object sender,
	EventArgs e


Type: System.Object

The source of the event, the Web Part.

Type: System.EventArgs

An EventArgs object that contains the event data.

When you create a ClearFilterEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

The following code example shows the declaration of an event of type ClearFilterEventHandler from a Microsoft.SharePoint.WebPartPages.WebPart class that implements the IFilterProvider interface. A code sample that shows the implementation of the event handler is in the ClearFilter event topic. A code sample that shows the full implementation of the IFilterProvider interface is in the IFilterProvider topic.

// Step #3: Declare the IFilterProvider events.
// Because this class implements the IFilterProvider interface, it must 
// declare the interface members SetFilter, ClearFilter, NoFilter. 

public event SetFilterEventHandler SetFilter;
public event ClearFilterEventHandler ClearFilter;
public event NoFilterEventHandler NoFilter;