IListConsumer Interface
IListConsumer Interface

The IListConsumer interface defines methods that a Web Part can implement so that it can consume an entire list (rowset) of data from another Web Part that implements the IListProvider interface.

Public Methods

The following table shows the methods of the IListConsumer interface and a brief description of each.

NameDescription
ListProviderInitEvent handler for the ListProviderInit event of a Web Part that implements the IListProvider interface.
ListReadyEvent handler for the ListReady event of a Web Part that implements the IListProvider interface.
PartialListReadyEvent handler for the PartialListReady event of a Web Part that implements the IListProvider interface.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

The IListConsumer interface should be implemented for Web Parts that need to consume a collection of data that can be characterized as a list, such as a table of data. A Web Part that implements the IListConsumer interface has the ability to receive initialization arguments from the provider part. Connecting the IListConsumer to the IListProvider interface is a direct connection, so no transformer dialog is displayed. To use the passed values appropriately, the consuming Web Part may need to be designed with an understanding of the data sent by the provider part.

Example

The following code example is a simple server-side IListConsumer Web Part. It can be connected to another Web Part that implements the IListProvider interface on the server. Its user interface displays the list that it receives from an IListProvider Web Part.

There are 8 steps specific to making this a connectable Web Part. These steps are numbered and commented in the sample code.

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

Requirements

Namespace: Microsoft.SharePoint.WebPartPages.Communication

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View