IFilterProvider.FilterConsumerInit method
NOTE: This API is now obsolete.
Um manipulador de eventos para o evento FilterConsumerInit que recebe a lista de campos e, opcionalmente, o campo Exibir nomes.
Namespace: Microsoft.SharePoint.WebPartPages.Communication
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaração
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub FilterConsumerInit ( _
sender As Object, _
filterConsumerInitEventArgs As FilterConsumerInitEventArgs _
)
'Uso
Dim instance As IFilterProvider
Dim sender As Object
Dim filterConsumerInitEventArgs As FilterConsumerInitEventArgs
instance.FilterConsumerInit(sender, filterConsumerInitEventArgs)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
void FilterConsumerInit(
Object sender,
FilterConsumerInitEventArgs filterConsumerInitEventArgs
)
Parâmetros
sender
Type: System.ObjectReferência ao objeto que chamar este método, que normalmente é this.
filterConsumerInitEventArgs
Type: Microsoft.SharePoint.WebPartPages.Communication.FilterConsumerInitEventArgsUm objeto FilterConsumerInitEventArgs que contém a lista de campos e os nomes para exibição opcionais campo enviados para a Web Part do consumidor.
Examples
O exemplo de código a seguir mostra uma implementação da FilterConsumerInit. Este exemplo de código é parte de um exemplo maior fornecido para a interface IFilterProvider .
' Step #8: Implement the FilterConsumerInit() method.
' The connected consumer part will call this method during its
' PartCommunicationInit phase
' to pass initialization information to the provider Web Part.
' The column names from the
' consumer Web Part are passed in. In this example, these values
' are used to dynamcially
' generate the input text boxes in the provider Web Part.
' <param name="sender">Consumer Web Part</param>
' <param name="filterConsumerInitArgs">The args passed by the
' Consumer</param>
Public Sub FilterConsumerInit(sender As Object,
filterConsumerInitEventArgs As FilterConsumerInitEventArgs)
Implements IFilterProvider.FilterConsumerInit
If Not (filterConsumerInitEventArgs.FieldList Is Nothing) Then
_fieldList = filterConsumerInitEventArgs.FieldList
Else
_fieldList = Nothing
End If
If Not (filterConsumerInitEventArgs.FieldDisplayList Is
Nothing) Then
_fieldDisplayList =
filterConsumerInitEventArgs.FieldDisplayList
Else
_fieldDisplayList = Nothing
End If
End Sub
// Step #8: Implement the FilterConsumerInit() method.
// The connected consumer part will call this method during its
// PartCommunicationInit phase
// to pass initialization information to the provider Web Part. The
// column names from the
// consumer Web Part are passed in. In this example, these values are
// used to dynamcially
// generate the input text boxes in the provider Web Part.
// <param name="sender">Consumer Web Part</param>
// <param name="filterConsumerInitArgs">The args passed by the
// Consumer</param>
public void FilterConsumerInit(object sender,
FilterConsumerInitEventArgs filterConsumerInitEventArgs)
{
if(filterConsumerInitEventArgs.FieldList != null)
_fieldList = filterConsumerInitEventArgs.FieldList;
else
_fieldList = null;
if(filterConsumerInitEventArgs.FieldDisplayList != null)
_fieldDisplayList =
filterConsumerInitEventArgs.FieldDisplayList;
else
_fieldDisplayList = null;
}