Freigeben über


ICellConsumer.CellReady-Methode

HINWEIS: Diese API ist veraltet.

Wird aufgerufen, nachdem das CellReady -Ereignis für ein verbundenes Webpart auftritt, beispielsweise wenn eine Zelle ausgewählt oder aktualisiert wird. Dieser Ereignishandler ist vom Typ CellReadyEventHandler.

Namespace:  Microsoft.SharePoint.WebPartPages.Communication
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")> _
Sub CellReady ( _
    sender As Object, _
    cellReadyArgs As CellReadyEventArgs _
)
'Usage
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
)

Parameter

  • sender
    Typ: System.Object

    Das Webpart, das die Quelle des Ereignisses ist.

Beispiele

Im folgenden Codebeispiel wird die Implementierung von einem CellReady -Ereignishandler. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die ICellConsumer -Schnittstelle.

' 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();
    }
}

Siehe auch

Referenz

ICellConsumer Schnittstelle

ICellConsumer-Member

Microsoft.SharePoint.WebPartPages.Communication-Namespace