共用方式為


IFilterConsumer.NoFilter method

NOTE: This API is now obsolete.

用來回應任何篩選條件將會提供從提供者 Web 組件的NoFilter事件的訊息。

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

Syntax

'宣告
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub NoFilter ( _
    sender As Object, _
    e As EventArgs _
)
'用途
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
)

參數

  • sender
    Type: System.Object

    在 [網頁組件的提供者實作 IFilterProvider 介面的物件參考。

  • e
    Type: System.EventArgs

    從 NoFilter Event傳遞事件引數。這會是 null 物件。

Examples

下列程式碼範例會顯示NoFilter方法的實作。這個程式碼範例是提供IFilterConsumer介面的完整範例的一部分。

' 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;
}

請參閱

參照

IFilterConsumer interface

IFilterConsumer members

Microsoft.SharePoint.WebPartPages.Communication namespace