Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 3.25 KB

developing-a-user-interface-for-a-custom-foreach-enumerator.md

File metadata and controls

41 lines (29 loc) · 3.25 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Developing a User Interface for a Custom ForEach Enumerator
Developing a User Interface for a Custom ForEach Enumerator
chugugrace
chugu
03/06/2017
sql
integration-services
reference
custom user interface [Integration Services], custom foreach enumerators
custom foreach enumerators [Integration Services], developing custom user interface

Developing a User Interface for a Custom ForEach Enumerator

[!INCLUDEsqlserver-ssis]

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 xref:Microsoft.SqlServer.Dts.Runtime.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 xref:Microsoft.SqlServer.Dts.Runtime.DtsForEachEnumeratorAttribute.UITypeName%2A property of the xref:Microsoft.SqlServer.Dts.Runtime.DtsForEachEnumeratorAttribute.

Coding the User Interface Control Class

Initializing the User Interface

You override the xref:Microsoft.SqlServer.Dts.Runtime.ForEachEnumeratorUI.Initialize%2A 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 xref:Microsoft.SqlServer.Dts.Runtime.ForEachEnumeratorUI.SaveSettings%2A method to copy the values selected by the user from the controls to the properties of the enumerator when the user closes the editor.

See Also

Creating a Custom Foreach Enumerator
Coding a Custom Foreach Enumerator