ICellConsumer.CellReady Method
NOTE: This API is now obsolete.
Called after the CellReady event for a connected Web Part occurs, such as when a cell is selected or updated. This event handler is of type 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
)
Parameters
sender
Type: System.ObjectThe Web Part that is the source of the event.
cellReadyArgs
Type: Microsoft.SharePoint.WebPartPages.Communication.CellReadyEventArgsThe event data.
Examples
The following code example shows the implementation of a CellReady event handler. This code example is part of a larger example provided for the ICellConsumer interface.
' 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();
}
}