TFS Custom controls: MultiValue with a twist

Topics: Developer Forum, User Forum
Jul 30, 2013 at 1:43 AM
Edited Jul 30, 2013 at 1:54 AM

I made some modification to fill the MultiValue control from an external page. The page address is configured using the attributes field in the Work Item Type's control properties.

To test and provide an example to others, I also created a sample project using the web.api to be queried by the multi value control.

Doing my changes I added a reference to System.Web.Helpers so I could use the json serialization to format the list. This is not mandatory but since I need to go Javascript for the WebAccess part it will be easier to access. Is that a problem?

Its m'y first time to contribue to an open-source project but I'd really want thoses changes make their way up to the real project. I did setup my machine to work with TortoiseSVN and would be ready to commit my changes. Is this the best way to go?

I will keep posting my progress here.
  • Stéphane
Jul 30, 2013 at 2:21 AM
Edited Jul 30, 2013 at 6:20 PM
Hi again,

Now, because the checklistbox is not well suited when you have a long list of values, I plan to adapt the control with an AutoCompleteSource to let the user type a few characters to select the proper values.

On the WebAccess side, I plan to use a jQuery UI plugin instead: jquery.ui.autobox.js. I already used it and it does the job well. Is there a problem adding that to the Web Access control? The plugin and dependencies are licensed with a mix of BSD or GPL and MIT licenses.
  • Stéphane
Aug 29, 2013 at 3:33 AM
Hi folks!,

I made some painfull progress on my project.

For the Web Access MultiValue control, there are some breaking changes in the repository and it took me a long time to realize that this was the cause of my problems.

Anyway, I am now ready with both version of the MultiValue control (Team explorer and WebAccess) enabled to get their values from a datasource.

The next part will be to implement an auto complete mecanism when the number of values is greather than some breakpoint.
  • Stéphane
Sep 12, 2013 at 4:04 PM
Interested in seeing how this works out. In the process of trying to figure out how to put serial numbers into a WIT that would help indicate rather or not a machine is turned on or not. The webservice has been created, but no clue on how to get the rest integrated.

AutoCompleteSource for those serial numbers would also be ideal.
Oct 27, 2013 at 2:45 PM

Its been a while but the extended control is now available in the repository or msi for both tfs2012 and tfs2013.

With that you can now feed the suggested values from either a static globallist (as before) or an URI returning json. To keep the existing behavior and ease transitions, if both are defined, the list of values are merged together (while removing duplicates).

Also, A new behavior has been added to let you choose between the actual CheckListBox or the new AutoComplete. The AutoComplete gives you a TextBox to type the first few letters of the value you want and present you the matching choices. When you select a value, its added to a CheckListBox from wich you can remove values.

So far, this AutoComplete feature is working only from Team Explorer but I'm working hard to complete the implementation on the WebAccess side.

Documentation will follow for the expected format and configuration but basically the URI must return a json formatted list (ex: ["A","B"]) and the address is provided by the MultiValueDataProvider attribute in the workitem type definition (ex: MultiValueDataProvider=http://tfsserver:8080/DataProvider/Api/MultiValueSource ). The attributes are also used to indicate what behavior you want. Behavior=AutoComplete for the AutoComplete. Nothing or anything else will stay with the CheckListBox.

Many thanks to Mathias Olausson which took care of testing and packaging everything.

I'll keep in touch...
Marked as answer by MOlausson on 12/31/2013 at 4:12 AM
Nov 1, 2013 at 2:57 PM
So, I would need to upgrade to TFS 2012 to get this functionality to work? Currently on 2010.
Nov 2, 2013 at 11:08 AM
Yes, we have decided to primarily target vCurrent and vNext for the controls, which means VS/TFS 2012 and 2013 at this time. In this particular case the control model changed between 2010 and 2012 which makes it difficult to back-port the code to older versions.

The ALM Rangers Upgrade Guide ( is a great resource on upgrade guidance BTW.