locked
Dynamically create controls in a TFS form

    Question

  • I would like to update my TFS form to have the following: In one of the tabs, I will have 3 drop downs initially. once the user selects data in these drop downs he can click on button or link to add more fields. On this click 3 more drop downs need to be created and so on. There is no limit to number of fields the user can add.
    I am using TFS 2013.

    Friday, June 26, 2015 1:28 AM

Answers

All replies

  • Yes, you can. Controls on a form can be created by code, without limit of the number, logically.
    Would you privide us further detail about your form and controls that would be created? 
    Friday, June 26, 2015 2:47 AM
  • Hi PerplexedDev,

    Please let us know whether you use TFS, and the detailed scenario that you're trying to do.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 26, 2015 7:17 AM
    Moderator
  • Yes, I use TFS form. I would like to update the TFS form to have the following:
    In one of the tabs, I will have 3 drop downs initially. once the user enters data in these drop downs he can click on button or link to add more fields. On this click 3 more drop downs need to be created and so on. There is no limit to number of fields the user can add.

    Friday, June 26, 2015 5:44 PM
  • I am trying to create dynamic controls in a TFS form. 
    Monday, June 29, 2015 8:52 PM
  • TFS forms can only be modified at design time.

    Notice that the TFS forms engine is capable to specify different layouts for different targets, which already tells us that it is a subset of the rendering engines for those targets, and as far as I know, with less capabilities. One of the restrictions is exactly that forms can only be modified at design time.

    As a workaround, at the bottom of the page on how to specify work item form controls, there is a link to an article on how to implement a custom control using Winforms. It might be possible to create a custom control with multiple drop down boxes which are dynamically displayed; I have not yet tried that.

    You can get better samples on how to implement a custom control in the Custom Controls for TFS Work Item Tracking project at CodePlex. The challenge though will be to also generate a web implementation for the same control, otherwise your work items will be visible only from Team Explorer.

    Regards,


    Clementino de Mendonça ALM Ranger

    Monday, June 29, 2015 9:21 PM