Thursday, March 22, 2012

Accessing Custom Properties in UI

I am attempting to set my custom properties in the UI I have created for my custom transformation. I can access them in the ProcessInput, but if I try to assign them a new value in my UI the values dont change.

I set the properties up in ProvideComponentProperties

public override void ProvideComponentProperties()

{

// Perform component setup operations

ComponentMetaData.UsesDispositions = false;

// Add Input

IDTSInput90 input = ComponentMetaData.InputCollection.New();

input.Name = "TrimInput";

input.ErrorRowDisposition = DTSRowDisposition.RD_NotUsed;

// Add Output

IDTSOutput90 output = ComponentMetaData.OutputCollection.New();

output.Name = "TrimOutput";

output.SynchronousInputID = input.ID;

IDTSCustomProperty90 Trimproperty = ComponentMetaData.CustomPropertyCollection.New();

Trimproperty.Name = "Trim Values";

Trimproperty.Description = "Selected Trim Values";

IDTSCustomProperty90 Colproperty = ComponentMetaData.CustomPropertyCollection.New();

Colproperty.Name = "Col Names";

Colproperty.Description = "Column Names";

}

btn Click event in UI form

IDTSCustomProperty90 Trimproperty = _dtsComponentMetaData.CustomPropertyCollection["Trim Values"];

Trimproperty.Value = sConcatTrim;

IDTSCustomProperty90 Colproperty = _dtsComponentMetaData.CustomPropertyCollection["Col Names"];

Colproperty.Value = sConcatColNames;

Any suggestions or please point me to any example would be greatly appreciated.

Could you share how you implemented DTSComponentUI interface? It could be that you are not committing changes when you close the UI.

Thanks.

|||

That was the problem .. fixed it. When the ok button was clicked on the form was not setting the form dialog result to ok.

Thank you,

Carlier

No comments:

Post a Comment