Hi,
I'm building a custom transformation component where each input column will have a custom dropdown property.
Here is some code of my code:
namespace MyCustomSSISComponent { public class MyClass : PipelineComponent { public override void OnInputPathAttached(int inputID) { base.OnInputPathAttached(inputID); IDTSInput100 ComponentInput = ComponentMetaData.InputCollection[0]; // I have code ensuring only 1 input is allowed for (int i = 0; i < ComponentInput.InputColumnCollection.Count; i++) { IDTSCustomProperty100 MyProperty = ComponentInput.InputColumnCollection[j].CustomPropertyCollection.New(); MyProperty.Name = "MyPropertyName"; MyProperty.UITypeEditor = typeof(MyUITypeEditor).AssemblyQualifiedName; MyProperty.State = DTSPersistState.PS_DEFAULT; } } } public class MyUITypeEditor : UITypeEditor { public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) {return UITypeEditorEditStyle.DropDown; } } }
What I would like to do now is populate the dropdown list in the custom column property with all the names of the input columns.
Can this be done?
Also, I declared the custom property within the OnInputPathAttached method. Is it appropriate to declare it within this method, or would it be better elsewhere?
Thanks