Partilhar via


NoFilterEventHandler Delegate

NOTE: This API is now obsolete.

Represents the method that will handle the NoFilterevent fired by a Web Part that implements the IFilterProvider interface. Upon receiving a NoFilter event, a Web Part that implements the IFilterConsumer interface should reuse the existing filter for the list.

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

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Public Delegate Sub NoFilterEventHandler ( _
    sender As Object, _
    e As EventArgs _
)
'Usage
Dim instance As New NoFilterEventHandler(AddressOf HandlerMethod)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
public delegate void NoFilterEventHandler(
    Object sender,
    EventArgs e
)

Parameters

  • sender
    Type: System.Object

    The source of the event, the Web Part.

Remarks

When you create a NoFilterEventHandler 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.

Examples

The following code example shows the declaration of an event of type NoFilterEventHandler from a Microsoft.SharePoint.WebPartPages.WebPart class that implements the IFilterProviderinterface. A code sample that shows the implementation of the event handler is in the NoFilter event topic. A code sample that shows the full implementation of the IFilterConsumerinterface 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 SetFilter As SetFilterEventHandler Implements IFilterProvider.SetFilter
Public Event ClearFilter As ClearFilterEventHandler Implements IFilterProvider.ClearFilter
Public Event NoFilter As NoFilterEventHandler Implements IFilterProvider.NoFilter
// 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;

See Also

Reference

Microsoft.SharePoint.WebPartPages.Communication Namespace