del método ICellConsumer.CellReady
NOTA: esta API está ahora obsoleta.
Se llama una vez que se produce el evento CellReady para un elemento Web conectado, como cuando se selecciona o se actualiza una celda. Este controlador de eventos es del tipo CellReadyEventHandler.
Espacio de nombres: Microsoft.SharePoint.WebPartPages.Communication
Ensamblado: Microsoft.SharePoint (en Microsoft.SharePoint.dll)
Sintaxis
'Declaración
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")> _
Sub CellReady ( _
sender As Object, _
cellReadyArgs As CellReadyEventArgs _
)
'Uso
Dim instance As ICellConsumer
Dim sender As Object
Dim cellReadyArgs As CellReadyEventArgs
instance.CellReady(sender, cellReadyArgs)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")]
void CellReady(
Object sender,
CellReadyEventArgs cellReadyArgs
)
Parámetros
sender
Tipo: System.ObjectEl elemento Web que es el origen del evento.
cellReadyArgs
Tipo: Microsoft.SharePoint.WebPartPages.Communication.CellReadyEventArgsLos datos del evento.
Ejemplos
En el ejemplo de código siguiente se muestra la implementación de un controlador de eventos CellReady . Este ejemplo de código forma parte de un ejemplo más extenso de la interfaz ICellConsumer .
' Step #9: Implement the CellReady event handler.
' The connected provider part(s) will call this method during its
' PartCommunicationMain phase
' to pass their primary data to the consumer Web Part.
' <param name="sender">Reference to the provider Web Part</param>
' <param name="cellReadyEventArgs">The args passed by the provider Web
' Part</param>
Public Sub CellReady(sender As Object, cellReadyEventArgs As
CellReadyEventArgs) Implements ICellConsumer.CellReady
' Make sure child controls have been created.
EnsureChildControls()
' Set the label text to the value of the cell that was passed by
' the provider part.
If Not (cellReadyEventArgs.Cell Is Nothing) Then
_cellConsumerTextBox.Text = cellReadyEventArgs.Cell.ToString()
End If
End Sub
// Step #9: Implement the CellReady event handler.
// The connected provider part(s) will call this method during its
// PartCommunicationMain phase
// to pass their primary data to the consumer Web Part.
// <param name="sender">Reference to the provider Web Part</param>
// <param name="cellReadyEventArgs">The args passed by the provider Web
// Part</param>
public void CellReady(object sender, CellReadyEventArgs cellReadyEventArgs)
{
// Make sure child controls have been created.
EnsureChildControls();
// Set the label text to the value of the cell that was passed by
// the provider part.
if(cellReadyEventArgs.Cell != null)
{
_cellConsumerTextBox.Text = cellReadyEventArgs.Cell.ToString();
}
}
Vea también
Referencia
Espacio de nombres Microsoft.SharePoint.WebPartPages.Communication