IFilterProvider.FilterConsumerInit method

NOTE: This API is now obsolete.

An event handler for the FilterConsumerInit event that receives the list of fields, and optionally field display names.

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

[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
void FilterConsumerInit(
	Object sender,
	FilterConsumerInitEventArgs filterConsumerInitEventArgs


Type: System.Object

Reference to the object calling this method, which is typically this.

Type: Microsoft.SharePoint.WebPartPages.Communication.FilterConsumerInitEventArgs

A FilterConsumerInitEventArgs object which contains the field list and optional field display names sent to the consumer Web Part.

The following code example shows an implementation of the FilterConsumerInit. This code example is part of a larger example provided for the IFilterProvider interface.

// Step #8: Implement the FilterConsumerInit() method.
// The connected consumer part will call this method during its 
// PartCommunicationInit phase
// to pass initialization information to the provider Web Part. The 
// column names from the
// consumer Web Part are passed in. In this example, these values are 
// used to dynamcially 
// generate the input text boxes in the provider Web Part.
// <param name="sender">Consumer Web Part</param>
// <param name="filterConsumerInitArgs">The args passed by the 
// Consumer</param>

public void FilterConsumerInit(object sender, 
   FilterConsumerInitEventArgs filterConsumerInitEventArgs)
    if(filterConsumerInitEventArgs.FieldList != null)
        _fieldList = filterConsumerInitEventArgs.FieldList;
        _fieldList = null;

    if(filterConsumerInitEventArgs.FieldDisplayList != null)
        _fieldDisplayList = 
        _fieldDisplayList = null;