C# Help
-
What im trying to do is to link the Treeview to the List view. I have the Treeview liked to the database already an i want it so that when i click on a node it will display in the List View. Does any one know how to do this? If so please Answer my Question
-
What im trying to do is to link the Treeview to the List view. I have the Treeview liked to the database already an i want it so that when i click on a node it will display in the List View. Does any one know how to do this? If so please Answer my Question
How have you attached the database to your tree view control? You can add an event handler to the tree view to intercept when the currently selected node has changed. Then, depending on how you've got things set up, you could possibly: #1 - Look up the required data from the database by the ID associated with a tree view node. #2 - Extract the information from the selected tree view node. Don't forget that you can use the 'Tag' property of tree view nodes, so you could associate your data using the Tag property. Then it is very easy to access your information. In your selected node changed event handler you can simply populate your list view from the associated 'Tag' property, or even acquire additional information from your data source using the information provided by the 'Tag' property. I hope that I have understood you correctly, and that this is of some use. :) Best regards, Lea Hayes