Tuesday, 15 May 2012

How to bind data in asp.net c# treeview control -



How to bind data in asp.net c# treeview control -

i have never used treeview command in asp.net need bind info it. stored procedure sql server returning the values below. m using c#

termid parentid name 2021 0 a. geographic locations 3602 2021 oceania 3604 3602 australasia 3621 3604 new zealand 3619 3604 pacific islands 3585 3619 polynesia 3592 3585 samoa 3594 3592 american samoa

each term has parentid , termid parentid=0 root node. how can bind info treeview. appreciate advise or examples

this may useful :

treeview command expects heirarchical info construction xml/sitemaps, cant bind datatable directly. utilize info table select parentid = id

please utilize recursive method create kid items relevent current menu item id, refer link below code.

http://www.charith.gunasekara.web-sphere.co.uk/2010/10/how-to-bind-datatable-to-aspnet.html

n below link help creating ur own tree view control.

http://www.codeproject.com/kb/tree/databoundtreeview.aspx

c# asp.net treeview

No comments:

Post a Comment