Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

recursive treeview in asp net

recursive treeview in asp net  using -'c#,,recursion,treeview'

I have an object of type list from which I wish to use to populate a treeview in c#.

Each object item has:

id | Name | ParentId

so for example:

id | Name     | ParentId
1  | Alice    | 0
2  | Bob      | 1
3  | Charlie  | 1
4  | David    | 2

In the above example, the parent would be Alice having two children Bob and Charlie. David is the child of Bob.

I have had many problems trying to dynamically populate the treeview recursively in c# ASP.NET

Does any one have a simple solution?

Btw: you can use People.Id, People.Name and People.ParentId to access the members since it is an object belonging to list.

I can post you my code so far (many attempts made) but not sure how useful it will be.

asked Sep 21, 2015 by dahiyabecomp
0 votes

Related Hot Questions

Government Jobs Opening