del método IFilterProvider.FilterConsumerInit
NOTA: esta API está ahora obsoleta.
Un controlador de eventos para el evento FilterConsumerInit que recibe la lista de campos y, opcionalmente, campo nombres para mostrar.
Espacio de nombres: Microsoft.SharePoint.WebPartPages.Communication
Ensamblado: Microsoft.SharePoint (en Microsoft.SharePoint.dll)
Sintaxis
'Declaración
<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
Tipo: System.ObjectReferencia al objeto que llama a este método, que normalmente es this.
filterConsumerInitEventArgs
Tipo: Microsoft.SharePoint.WebPartPages.Communication.FilterConsumerInitEventArgsUn objeto FilterConsumerInitEventArgs que contiene la lista de campos y nombres para mostrar campo opcional enviados para el elemento Web del consumidor.
Ejemplos
En el ejemplo de código siguiente se muestra una implementación de la FilterConsumerInit. Este ejemplo de código forma parte de un ejemplo más extenso de la interfaz 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;
}
Vea también
Referencia
Espacio de nombres Microsoft.SharePoint.WebPartPages.Communication