Hello,
I went through quite a few discussions and documentation about adding custom control but I am getting a bit lost.
I have a use case that I need to have a dropdown with options so that at design time in Workflow user can pick a value and it will be used in the custom activity.
I created a custom control by adding a comboBox (id TemplateList) following some suggestions to override certain methods. All I want is to capture what option is selected
public partial class TemplateSelection : EditPanelControlBase { public TemplateSelection() { InitializeComponent(); } private string _selectedTemplateValue = String.Empty; public override void NotifyPanelShown() { this.UpdatePanel(); base.NotifyPanelShown(); } public override void Save() { this.Value = _selectedTemplateValue; base.Save(); } private void UpdatePanel() { _selectedTemplateValue = this.Value.ToString(); this.TemplateList.SelectedValue = _selectedTemplateValue; } private void TemplateList_SelectedIndexChanged(object sender, EventArgs e) { _selectedTemplateValue = TemplateList.SelectedValue.ToString(); this.Save(); } }
My questions are:
1. I found a Laserfiche sample by linking it to a list (list<string>). That example is to have a checklist and selected values will be added to a list of string.
In my case I want to have a dropdown list and I want to have 1 selected value.
Is List<string> a correct type? How can I get the selected value in my custom activity code? Is the expect to have the selection and it will map to the list<string> with 1 list item?
2. I read from a discussion that I can use type "object" as a property type. I was able to enable have the Edit Control option in proxy generator. However when I engage the custom activity, the configuration panel for the activity was not able to rendered properly
What are the possible property types that can enable the option Edit Control option in proxy generator? I can't find any documentation explaining that.