IFilterConsumer.NoFilter - Méthode
Remarque : cette API est désormais obsolète.
Permet de répondre à un message qui ne sera fourni aucun filtre à partir de l'événement NoFilter d'un composant WebPart fournisseur.
Espace de noms : Microsoft.SharePoint.WebPartPages.Communication
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub NoFilter ( _
sender As Object, _
e As EventArgs _
)
'Utilisation
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
)
Paramètres
sender
Type : System.ObjectUne référence à l'objet qui implémente l'interface IFilterProvider sur le composant WebPart fournisseur.
e
Type : System.EventArgsLes arguments d'événement qui sont passés à partir de la NoFilter Event. Il s'agit d'un objet null .
Exemples
L'exemple de code suivant illustre une implémentation de la méthode NoFilter . Cet exemple de code fait partie d'un exemple plus développé fourni pour l'interface 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;
}
Voir aussi
Référence
Microsoft.SharePoint.WebPartPages.Communication - Espace de noms