I am trying to build a directory tree in my application.
I am using this Example from Ext.NET
.
How I can search a given path for directories and sub-directories in order to build this tree?
Here is the code given in the example to build the tree from nodes:
protected void NodeLoad(object sender, NodeLoadEventArgs e)
{
if (!string.IsNullOrEmpty(e.NodeID))
{
for (int i = 1; i < 6; i++)
{
AsyncTreeNode asyncNode = new AsyncTreeNode();
asyncNode.Text = e.NodeID + i;
asyncNode.NodeID = e.NodeID + i;
e.Nodes.Add(asyncNode);
}
for (int i = 6; i < 11; i++)
{
Ext.Net.TreeNode treeNode = new Ext.Net.TreeNode();
treeNode.Text = e.NodeID + i;
treeNode.NodeID = e.NodeID + i;
treeNode.Leaf = true;
e.Nodes.Add(treeNode);
}
}
}