Add a Treeview Control to Lightswitch
Display of hierarchical data is a requirement in many business applications. The forums and blogs are full of questions on how to add a treeview to a Lightswitch application. While it can be done with a custom control, adding it to the standard set of controls would certainly make Lightswitch a more powerful business application development environment. BTW, be sure and have a two-way SelectedItem property.
Thank you for the suggestion. We have added it to our product backlog and will consider it for a future release.
Displaying hierarchical data is possible today using custom controls in a LightSwitch HTML client application. Michael Washington has written a blog post (http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2220/JQuery-Mobile-Tree-Using-Collapsible-Sections-and-Dynamic-Views-in-LightSwitch.aspx) describing how to implement collapsible sections using Jewel Lambart’s Collapsible Content Control (http://jewellambert.com/jquery-mobile-collapsible-content-control-with-lightswitch/).
Elizabeth Maher, LightSwitch Team
Ok the trick by Andy Kung is working (Thanks) but still its a pain to add a simple treeview to business applications with uses treeviews very often...
Really an out of the box treeview would be a huge leap and a relaxing development experience to developers as they are used often and LS is really a very capable framework.
(How could we have guessed that we need to enumerate the children on the same LS UI thread!!!)
Any way thanks Andy for the help, hope our voice gets really heard ;)
I have created a Treeview Control that includes all standard Treeview Functions, plus Drag-n-Drop, Checkboxes, Many-TO-Many relationships, and more. http://vanbergconsulting.com/vblightswitch/products-page/lightswitch-controls/treeview-control-2011/
Lucas Ponzo commented
It's a very important requirement I've expected since version 2011! Really MANDATORY for next 2012 Release Candidate, and in final release of LS 2012 as weel.
I heartily agree with this comment. Treeview is always needed.
Hi dave, I also need a treeview control. Middletime I have writed my own custom control: http://beutil.blogspot.com.es/2012/04/lightswitch-custom-control-tree-loojup.html
Andy Kung commented
Thank you for the suggestion! I believe this is one of the forum threads you're mentioning in case folks are wondering...
- LightSwitch Team