Tree view dropdown control for Visual Studio Online (VSTS) dashboard
Recently, I was working on a small project to create a VSO dashboard widget (tile). One of my tasks was to create a tree view dropdown for area path, which pretty much similar to the Area Path dropdown control in VSO workitem. If you guys come here somehow then I am pretty sure you already went through these pages:
Add dashboard tutorialTree view documentation
Therefore, I won’t go through content in those pages in detail. Instead of that, I will go directly to the part that I’ve done to make it works.
This is the Analytics service from Visual Studio that I was using to retrieve the data of area paths. Here is how the data looks like
Based on the response, they are using odata so you might need something like this to grab all the data
So we already have all the data we need. Let’s build a tree using it.
And of course we need to have html template for our control:
There are a few things left like CSS or some event bindings. I will let you guys figure it out yourself cause it depends on your scope.
Example result