none
Dynamically adding rows to Custom Workflow ActivitySettingsPart

    Question

  • In the Password Reset AuthN Workflow activity you can change the number of questions for the gate and new rows are dynamically added to the Step 2 - Questions.

    Has anyone done anything similar in a custom activity? If so, how do you do it? I'd like to add a new row with a text box and a couple of checkboxes when hitting an "Add" button. Presumably the button click activity needs to access the ActivitySettingsPart and call the CreateChildControls() sub - but I can't work out how to do this (web dev is not an area of expertise)

    Cheers,

    Dave


    Dave Nesbitt

    Tuesday, October 29, 2013 2:55 PM

All replies

  • You're probably looking for a combination of AutoPostBack and/or wiring event handlers to the buttons (not sure what you're doing exactly). You can wire an event handler to the Clicked event on your button control when you create it, or perhaps the CheckChanged (sp?) event on your checkboxes. Autopostback and checking the state of the checkboxes is probably enough though for those without the event handler.

    Thanks, Brian

    Tuesday, October 29, 2013 9:13 PM
  • Dave, were you able to get this figured out?  I'm wishing to do something similar.

    Simply following how events are added in winforms (oCheckBox.CheckedChanged += oCheckBox_CheckedChanged;) doesn't seem to work as the the method oCheckBox_CheckedChanged is never called.

    I do know that it is possible.  I've seen a slick activity that Microsoft Consulting Services uses that does the very thing you mention.

    Monday, July 28, 2014 6:22 PM