ICellConsumer.CellReady method
NOTE: This API is now obsolete.
Chamado depois que ocorre o evento CellReady para uma Web Part, como quando uma célula é selecionada ou atualizada. Esse manipulador de eventos é do tipo CellReadyEventHandler.
Namespace: Microsoft.SharePoint.WebPartPages.Communication
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaração
<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
Type: System.ObjectA Web Part que é a origem do evento.
cellReadyArgs
Type: Microsoft.SharePoint.WebPartPages.Communication.CellReadyEventArgsOs dados do evento.
Examples
O exemplo de código a seguir mostra a implementação de um manipulador de eventos CellReady . Este exemplo de código é parte de um exemplo maior fornecido para a interface 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();
}
}