共用方式為


CellConsumerInitEventHandler Delegate

NOTE: This API is now obsolete.

Represents the method that will handle the CellConsumerInit event fired by a Web Part that implements the ICellConsumer interface.

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

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")> _
Public Delegate Sub CellConsumerInitEventHandler ( _
    sender As Object, _
    e As CellConsumerInitEventArgs _
)
'Usage
Dim instance As New CellConsumerInitEventHandler(AddressOf HandlerMethod)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")]
public delegate void CellConsumerInitEventHandler(
    Object sender,
    CellConsumerInitEventArgs e
)

Parameters

  • sender
    Type: System.Object

    The source of the event, the WebPart.

Remarks

When you create a CellConsumerInitEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Examples

The following code example shows the declaration of an event of type CellConsumerInitEventHandler from a Microsoft.SharePoint.WebPartPages.WebPart class that implements the ICellConsumer interface. A code sample that shows the implementation of the event handler is in the CellConsumerInit event topic. A code sample that shows the full implementation of the ICellConsumer interface is in the ICellConsumer topic.

' Step #3: Declare the ICellConsumer events.
' Because this class implements the ICellConsumer interface, it must 
' declare the interface member event CellConsumerInit. 
Public Event CellConsumerInit As CellConsumerInitEventHandler Implements ICellConsumer.CellConsumerInit
// Step #3: Declare the ICellConsumer events.
// Because this class implements the ICellConsumer interface, it must 
// declare the interface member event CellConsumerInit. 
public event CellConsumerInitEventHandler CellConsumerInit;

See Also

Reference

Microsoft.SharePoint.WebPartPages.Communication Namespace