I'm new to treeviews. I can see that they could be really useful.
I've got some code that will allow me to choose from one field in my table using a combo box and then the formview automatically shows the whole record from that table.
Can anyone show me how to do the same with a treeview? ie a treeview to replace the combo box please.
It is pointless using a TreeView unless your data has a tree-like structure. If you are only going to go one level deep then you should just use a ListBox or ListView.
Thanks for your reply.
Sorry, I should have explained that eventually I will want to select from a node at a lower level but for now I just wanted a pointer in the direction so a simple one level tree would demonstrate the principle.
I have been using treeviews in MSAccess for some time and developed quite complex solutions. I can now see that I might be able to transfer this complexity to the web page.
Sorry for that then. Are you developing a Winforms app or a WebForms app? The TreeView is a WinForms control, so you can't use it on a web page. If it is a WinForms app, I'd suggest you just look at the help topic entitled "TreeView Control (Windows Forms)", which provides links to pretty much all the information you'd need.
Thanks again for the reply.
You can use Treeview in a webform. I have some trivial examples working already!
Well that's interesting. I've never done any Web development but I was under the impression that Windows Forms controls were limited to Windows Forms apps, or is there a Web-specific TreeView class that I'm not aware of?