how to populate tree view from single table with parent child relation
This is my table
GrpId GrpName PId
*********************
1 Department 0
2 Grp1 1
3 Admin 2
4 Sales 2
5 Purchase 3
6 Grp2 1
7 Finance 6
8 Production 6
I want the result as like this
Department
----Grp1
-------Admin
-------Sales
-------Purchase
----Grp2
-------Finance
-------Production
Loading
Satyapriya NayakPosted Sep 20, 2012, 3:45 AM
Please refer the below links
http://www.santry.com/Blog/tabid/90/ID/1241/Populating-a-Net-Treeview-control-from-a-parent-child-relationship-db-table.aspx
http://stackoverflow.com/questions/5848603/how-to-populate-tree-view-for-parent-child-relation-in-same-table-in-vb-net
Thanks
If this post helps you mark it as answer