sql server - Populate Treeview from Datatable -
i have sql table (called tblclosure) has these fields:
- locationid
- locationdesc
- parentid
my question how can populate treeview control datatable in winforms/vb? have seen examples in c# i'm rookie coder , having difficulties adapting code.
any appreciated.
thanks in advance
if having 2 levels of hierarchy of data, suggest using gridview control instead , bind datatable results query this
select case when parentid>0 parentid else locationid end theparentid ,locationid ,locationdesc ,parentid tblclosure order 0, parentid, locationdesc then based on value of parentid style differently show if parent or child row.
Comments
Post a Comment