Partilhar via


IRowConsumer.RowReady Method

NOTE: This API is now obsolete.

Provides an event handler for the RowReady event of a provider Web Part that implements the IRowProviderinterface.

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

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartRow instead")> _
Sub RowReady ( _
    sender As Object, _
    rowReadyEventArgs As RowReadyEventArgs _
)
'Usage
Dim instance As IRowConsumer
Dim sender As Object
Dim rowReadyEventArgs As RowReadyEventArgs

instance.RowReady(sender, rowReadyEventArgs)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartRow instead")]
void RowReady(
    Object sender,
    RowReadyEventArgs rowReadyEventArgs
)

Parameters

  • sender
    Type: System.Object

    A reference to the Web Part that is the source of the event.

Remarks

If the consumer Web Part only expects one row, it should always take the first row in the array and ignore all other rows. Multiple rows can be used in cases where a Web Part can work with a set of rows (for example, when multiple rows are selected). This event handler is of type RowReadyEventHandler.

Examples

The following code example shows the implementation of a RowReady event handler. This code example is part of a larger example provided for the IRowConsumer interface.

' Step #7: Implement the RowReady 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="rowReadyEventArgs">The args passed by the provider Web 
' Part</param>
 Public Sub RowReady(sender As Object, rowReadyEventArgs As RowReadyEventArgs) _
     Implements IRowConsumer.RowReady
     ' Store the row values.
     If Not (rowReadyEventArgs.Rows Is Nothing) Then
        If Not (rowReadyEventArgs.Rows(0) Is Nothing) Then
            _rowFieldValues(0) = rowReadyEventArgs.Rows(0)
        End If
     End If
     _selectionStatus = rowReadyEventArgs.SelectionStatus
 End Sub
// Step #7: Implement the RowReady 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="rowReadyEventArgs">The args passed by the provider Web Part</param>
public void RowReady(object sender, RowReadyEventArgs rowReadyEventArgs)
{
    // Store the row values.
    if(rowReadyEventArgs.Rows!= null)
    {
       if(rowReadyEventArgs.Rows[0]!=null)
       {
   _rowFieldValues[0] = rowReadyEventArgs.Rows[0];
       }
    }       
    _selectionStatus = rowReadyEventArgs.SelectionStatus;
}

See Also

Reference

IRowConsumer Interface

IRowConsumer Members

Microsoft.SharePoint.WebPartPages.Communication Namespace