Click here to Skip to main content
15,910,980 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I want to bind tree view in c# using SQL CTE query. the query of sql is given on this link. please any can tell me how this query used to bind treeview in c#.

http://blog.crowe.co.nz/blog/archive/2007/09/06/Microsoft-SQL-Server-2005---CTE-Example-of-a-simple.aspx

thanks in advance
Posted

Please check this link:

http://stackoverflow.com/questions/2572721/recursive-treeview-in-asp-net[^]

I got the same problem too. I solved it from here.

Please use
C#
private void BindTree(IEnumerable<MyObject> list, TreeNode parentNode)


the above method. Hopefully you can solve this one.
 
Share this answer
 
v2
Comments
bburhanbohra 18-Feb-11 1:18am    
thanks for ur reply. but this is asp.net code i want c# code for window application.
arindamrudra 18-Feb-11 1:27am    
Though I work on ASP.NET, but you can tell me what the error you got. Hopefully the events are there. If you get error in IEnumerable<myobject> then please use the namespace collection.generic. if you cant find it too, then please update your referance you will get that work.
Data Binding TreeView in C#[^]article from CP and simple-family-tree-query[^] will give you an idea.
 
Share this answer
 
v2

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