IFilterConsumer.NoFilter Method

NOTE: This API is now obsolete.

Used to respond to a message that no filter will be provided from the NoFilter event of a provider Web Part.

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

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub NoFilter ( _
    sender As Object, _
    e As EventArgs _
)
'Usage
Dim instance As IFilterConsumer
Dim sender As Object
Dim e As EventArgs

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

Parameters

  • sender
    Type: System.Object

    A reference to the object that implements the IFilterProvider interface on the provider Web Part.

  • e
    Type: System.EventArgs

    The event arguments that are passed from the NoFilter Event. This will be a null object.

Examples

The following code example shows an implementation of the NoFilter method. This code example is part of a larger example provided for the IFilterConsumer interface.

' Step #11: Implement NoFilter event handler.
' The connected provider part will call this method during its 
' PartCommunicationMain phase to indicate there is no change in the 
' filter. This allows the consumer part to 
' display its cached data instead of recalculating the filter 
' expression or potentially hitting a database again. 
' <param name="sender">Provider Web Part</param>
' <param name="eventArgs">The Event Arguments</param>
Public Sub NoFilter(sender As Object, eventArgs As EventArgs) Implements IFilterConsumer.NoFilter
   ' Ensure that all of the Web Part's controls are created.
   EnsureChildControls()
   
   ' No change in the filter so use cached _cachedRowFilter.
   _rowFilterExpression = _cachedRowFilter.Text
End Sub
// Step #11: Implement NoFilter event handler.
// The connected provider part will call this method during its 
// PartCommunicationMain phase
// to indicate there is no change in the filter. This allows the 
// consumer part to display its cached data instead of recalculating 
// the filter expression or potentially hitting a database again. 
// <param name="sender">Provider Web Part</param>
// <param name="eventArgs">The Event Argumentsr</param>

public void NoFilter(object sender, EventArgs eventArgs)
{
    // Ensure that all of the Web Part's controls are created.
    EnsureChildControls();

    // No change in the filter so use cached _cachedRowFilter.
    _rowFilterExpression = _cachedRowFilter.Text;
}

See Also

Reference

IFilterConsumer Interface

IFilterConsumer Members

Microsoft.SharePoint.WebPartPages.Communication Namespace