Share via


IListConsumer.ListProviderInit method

NOTE: This API is now obsolete.

Provides an event handler for the ListProviderInit event of a Web Part that implements the IListProvider interface.

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

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartTable instead")> _
Sub ListProviderInit ( _
    sender As Object, _
    listProviderInitEventArgs As ListProviderInitEventArgs _
)
'Usage
Dim instance As IListConsumer
Dim sender As Object
Dim listProviderInitEventArgs As ListProviderInitEventArgs

instance.ListProviderInit(sender, listProviderInitEventArgs)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartTable instead")]
void ListProviderInit(
    Object sender,
    ListProviderInitEventArgs listProviderInitEventArgs
)

Parameters

Examples

The following code example shows an implementation of the ListProviderInit method. This code example is part of a larger example provided for the IListConsumer interface.

' Step #6: Implement the ListProviderInit event handler.
' The connected provider part(s) will call this method during its 
' PartCommunicationInit phase to pass initialization information to the 
' consumer Web Part.
' <param name="sender">Reference to the Consumer Web Part</param>
' <param name="listProviderInitEventArgs">The args passed by the 
' provider Web Part</param>
Public Sub ListProviderInit(sender As Object, listProviderInitEventArgs As ListProviderInitEventArgs) _
     Implements IListConsumer.ListProviderInit
End Sub 'ListProviderInit

' Because this class implements the IListConsumer interface, it must 
' implement the interface member ListProviderInit. However, this 
' example doesn't use any initialization data that is passed in here.
// Step #6: Implement the ListProviderInit event handler.
// The connected provider part(s) will call this method during its 
// PartCommunicationInit phase to pass initialization information to 
// the consumer Web Part.
// <param name="sender">Reference to the Consumer Web Part</param>
// <param name="listProviderInitEventArgs">The args passed by the 
// provider Web Part</param>
public void ListProviderInit(object sender, ListProviderInitEventArgs listProviderInitEventArgs)
{
    // Because this class implements the IListConsumer interface, it 
    // must implement the interface member ListProviderInit. However, 
    // this example doesn't use any initialization data that is passed 
    // in here.
}

See also

Reference

IListConsumer interface

IListConsumer members

Microsoft.SharePoint.WebPartPages.Communication namespace