dynamic treeview nodes

Populating Treeview with N- Level Tree Structure Dynamically in VB.Net

Submitted by saadi92 on
From last two weeks I was facing a problem regarding populating a treeview on a vb .net form , with the data from a table which contains N level of child nodes. I searched but i couldnt find exact solution, anyways finally I was able to solve it using recursive function.... Here is the code... The database table has two fields one is AcCode and 2nd is Parent ID... Private Sub AddTreeNodes(ByRef tv