共用方式為


CellProviderInitEventHandler Delegate

NOTE: This API is now obsolete.

Represents the method that will handle the CellProviderInit event fired by a Web Part that implements the ICellProvider 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 CellProviderInitEventHandler ( _
    sender As Object, _
    e As CellProviderInitEventArgs _
)
'Usage
Dim instance As New CellProviderInitEventHandler(AddressOf HandlerMethod)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartField instead")]
public delegate void CellProviderInitEventHandler(
    Object sender,
    CellProviderInitEventArgs e
)

Parameters

  • sender
    Type: System.Object

    The source of the event, the WebPart object.

Remarks

When you create a CellProviderInitEventHandler 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 CellProviderInitEventHandler from a Microsoft.SharePoint.WebPartPages.WebPart class that implements the ICellProvider interface. A code sample that shows the implementation of the event handler is in the CellProviderInit event topic. A code sample that shows the full implementation of the ICellProvider interface is in the ICellProvider topic.

' Step #3: Declare the ICellProvider events.
' Because this class implements the ICellProvider interface, it must 
' implement the interface member events CellProviderInit and CellReady.
Public Event CellProviderInit As CellProviderInitEventHandler Implements ICellProvider.CellProviderInit
Public Event CellReady As CellReadyEventHandler Implements ICellProvider.CellReady
// Step #3: Declare the ICellProvider events.
// Because this class implements the ICellProvider interface, it must 
// implement the interface member events CellProviderInit and 
// CellReady.
public event CellProviderInitEventHandler CellProviderInit;    
public event CellReadyEventHandler CellReady;

See Also

Reference

Microsoft.SharePoint.WebPartPages.Communication Namespace