Share via


Developing a User Interface for a Custom ForEach Enumerator

After you have overridden the implementation of the properties and methods of the base class to provide your custom functionality, you may want to create a custom user interface for your Foreach enumerator. If you do not create a custom user interface, users can only configure the new custom Foreach enumerator by using the Properties window.

In a custom user interface project or assembly, you create a class that implements ForEachEnumeratorUI. This class derives from System.Windows.Forms.UserControl, which is typically used to create a composite control to host other Windows Forms controls. The control that you create is displayed in the Enumerator configuration area of the Collection tab of the Foreach Loop Editor.

Important

After signing and building your custom user interface and installing it in the global assembly cache as described in Building, Deploying, and Debugging Custom Objects, remember to provide the fully qualified name of this class in the UITypeName property of the DtsForEachEnumeratorAttribute.

For a working sample of a custom enumerator, see the Integration Services samples on Codeplex.

Coding the User Interface Control Class

Initializing the User Interface

You override the Initialize method to cache references to the host object, and to the collections of connection managers and variables defined in the package.

Setting Properties on the User Interface Control

The UserControl class, from which the user interface class is derived, is intended for use as a composite control to host other Windows Forms controls. Because this class hosts other controls, you can design your custom user interface by dragging and dropping controls, arranging them, setting their properties, and responding at run time to their events as in any Windows Forms application.

Saving Settings

You override the SaveSettings method to copy the values selected by the user from the controls to the properties of the enumerator when the user closes the editor.

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.