treeview with database
I want to create a treeview with multiple level, the source will read from the database. but i can't find the way to implement that dynamic multi-level tree. could anyone give me an example?
Data sample:
A
AB
ABA
ABAA
AC
ACA
ADA
B
BA
.
.
.
thanks
mReader = mclsDBCon.runReader(strSQL)
TreeView1.Nodes.Clear()
Dim node As TreeNode
Do While mReader.Read
If Len(Trim(mReader.GetValue(0).ToString)) = 1 Then
node = TreeView1.Nodes.Add(Trim(mReader.GetValue(1).ToString))
Else
node.Nodes.Add(Trim(mReader.GetValue(1).ToString))
End If
Loop

