How To: Manage Custom Controls In Team System and Web Access
Here is couple of question I’m hearing from people about Custom Controls:
1. Why after I add a custom control to my work item I see an error message in the Web Access?
2. Even when I have Web Access Custom Control and Team System Custom Control I can’t get them to work together, always one of them shows me an error, Why?
2.Because those Custom Controls are different you need to modify the Work Item definition for Team System and Web Access.
This is how you do it:
First install TFS PowerTools 2008.
Use Process Editor to export the Work Item we want to modify.
After we export the work item to our local drive, open it for edit.
Inside the Work Item Definition Duplicate the <Layout> information and add Target Attribute.
One Layout with Target=”WinForms”
And the other one with Target=”Web”
Now you got two options:
1. If you only have Team System Custom Control, Remove the Custom Control within the <Layout Target=”Web”> .
So now in the Team System you will see the custom control and in the Web Access this Custom Control will be gone!
2. If you have both Custom Controls , Web Access and Team System, just replace the name of the Custom Control.
<Control Type=”Forms_CustomControl” Label=”Custom Control For WinForms” LabelPosition=”Left” />
<Control Type=”Web_CustomControl” Label=”Custom Control For Web” LabelPosition=”Left” />
After you finish modifying the Work Item Definition use process editor to import the changes.
Perform iisreset /restart to apply changes in Web Access.