Populate Combo box from treeview
Posted on 2011-09-25
I have a treeview and it works just fine. Now, what I'm trying to do is use the information in the treeview to populate a combo box. For example, if a user wants to add a new category, I want them to enter the information in a pop-up form and if the new category is a sub-category of an existing category, then I want them to be able to select the parent category from the combo box. This logic will also be used to change a category or sub-category. The thing about it is, I'm not sure where to begin because the combo box needs to be populated like this:
...and so on
The categories should be lined up under each other (indented as appropriate) after a change the treeview need to be refreshed.