Click here to Skip to main content
15,918,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i click on particular node in treeview control then only related records of that node will be fetch from database and display in listview control.
Posted
Comments
DaveAuld 10-Sep-11 6:31am    
Firstly how are you populating the node? where is the information relating to the database e.g. and ID, search term or whatever being stored? in the text field, the tag field or have you created a custom node inheriting from treenode with your own properties?

1 solution

When loading the tree-view control, put the database key in the Tag field of each node. When the node is clicked use that ID in your SQL query to return the rows for the list view.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900