views:

167

answers:

1

I am generating following kind of data from Oracle (using its Hierarchical data query feature).

Level Category

1   ABC
2   XYZ
3   HJK
3   IKJ
3   OLK
3   FGH
2   ASV
3   IKL
3   LOK
3   TYR
3   ERO
2   QWE
3   OPR

Rules of Game:

  • From Top to bottom:each lower level category is parent of of its next level category.
  • From bottom to top:All same level categories are siblings and children of its very next lower level category.

(This is just sample data upto 3rd level,it can go deep until n level). i.e.

  1. ABC(1) has no parents
  2. XYZ(2) is child of ABC.
  3. HJK(3),IKJ(3),OLK(3),FGH(3) are siblings and all are childen of XYZ(2).
  4. ASV(2) is child of ABC(1) its very next lower level from bottom to top.
  5. IKL(3),LOK(3),TYR(3),ERO(3) are childen of ASV(2) very next lower level from bottom to top.
  6. LQW(2) is child of ABC(1) its very next lower level from bottom to top.
  7. OPR(3) is child of QWE(2) its very next lower level from bottom to top.

I understand well C#,ASP.NET and databases but i find this logic difficult to program.


Please help me to display this data on ASP.NET treeView Control.

A: 

Maybe this one can help you,

I asked the same question months ago here : http://stackoverflow.com/questions/361661/populate-treeview-from-database

Braveyard
Thanks Aron.But your poblem was straight forwrad ..The difficult part of my problem is handling of parent child relationship.
IA