Hi,
I am creating a custom transformation component, and a custom user interface for that component.
In
my custom UI, I want to show the custom properties, and allow users to
edit these properties similar to how the advanced editor shows the
properties.
I know in my UI I need to create a "Property Grid".
In
the properties of this grid, I can select the object I want to display
data for, however, the only objects that appear are the objects that I
have already created within this UI, and not the actual component
object with the custom properties.
How do I go about getting the properties for my transformation component listed in this property grid?
I am writing in C#.
You don't have to use a Propery Grid at all. If using a custom UI, then use any form control.
Pipeline components do not expose their properties through a nice (wrapper) object, you may want to write your own wrapper object and pass that to the property grid control.
I'm not quite sure what you mean when you talk about selecting the object to display data for. You decide the object. Start with DTSComponentMetadata90, as first made available to you in IDtsComponentUI.Initialize. You are passing that through?
|||The reason why I wanted to use the property grid was because it just looks nice and keeps a standard with what most of the component UI's are using. My next option that I have already started to work on in the mean time is to just use text boxes because they are simple to use.I am passing the metadata through.
In the properties dialog of the "Properties Grid" there is a property until the "Behaviour" section called "SelectedObject"
In the list that is provided I can only select objects that I have added to my windows form. If I select one of those, it shows me what I would expect, the properties for that windows form object (such as a text box).
I have no idea how to add properties of the actual component using the metadata however. Some instruction on how to do so would be greatly appreciated.
Thanks|||
Create a wrapper object, that is simply a class with properties that mimic your component level properties. Then in code set the SelectedObject to this object. You cannot use the "designer" to select an object that is not on your form, and the SSIS component object will never be on your form.
Your wrapper class should query IDTSComponentMetadata90 and use the CManagedComponentWrapper to call SetProperty (sp?) to save the values.
|||Can you please provide a small sample as to how to create this wrapper object. I am not too familiar with any of this yet so it would be a great help if you could.EDIT: Figured it out, thanks for your help.
No comments:
Post a Comment