Compartilhar via


GetInitEventArgs Method

The GetInitEventArgs method of the WebPart class returns the InitEventArgs object for the name of the interface that is passed in.

Parameters

interfaceName   The name of the interface for which to retrieve an InitEventArgs object.

Return Value

An InitEventArgs object such as a CellProviderInitEventArgs object returned by a Web Part that implements the ICellProvider interface.

Remarks

The GetInitEventArgs method is only required for the interfaces of theMicrosoft.SharePoint.WebPartPages.Communication namespace that can use transformers, such as the IRowProvider, ICellConsumer, IFilterConsumer, IParametersOutProvider, and IParametersInConsumer interfaces. The GetInitArgs method is called by the Web-based connection authoring user interface for all the initial data required for creating a connection that involves a transformer. It is a virtual method on the WebPart base class that must be overridden by the developer for the interfaces that use transformers. If it is not overridden, an error message will be displayed.

Example

The following code example shows an overridden GetInitEventArgs method. This code example is part of a larger example provided for theICellConsumer interface.

For an overview of the steps of creating a connectable Web Part, see Creating a Connectable Web Part.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security The WebPartPermissions.Connections permission is required to use this member.