I'm working with the RadTreeView, and the RadTreeView is being loaded from a folder structure on an FTP Server;
My question is how best can I change the order programmatically with C# - move a node value from last item to the seventh item;
The code snippet below displays how the RadTreeView is being loaded with C#, and I am able locate the node value - which needs to be moved in the RadTreeView hiarchy;
Thanks in advance for any insight; Best regards - Rob
My question is how best can I change the order programmatically with C# - move a node value from last item to the seventh item;
The code snippet below displays how the RadTreeView is being loaded with C#, and I am able locate the node value - which needs to be moved in the RadTreeView hiarchy;
Thanks in advance for any insight; Best regards - Rob
private
void
BindTreeToDirectory(
string
virtualPath, RadTreeNode parentNode)
{
string
physicalPath = Server.MapPath(virtualPath);
string
[] directories = Directory.GetDirectories(physicalPath);
foreach
(
string
directory
in
directories)
{
RadTreeNode node =
new
RadTreeNode(Path.GetFileName(directory));
node.Value = virtualPath +
"/"
+ Path.GetFileName(directory);
node.ImageUrl =
"~/TreeView/Img/Vista/folder.png"
;
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
//if (node.Value == "/Customers/Maines Paper & Foodservice/Side Letters")
if
(node.Value ==
"/Customers/Maines Paper & Foodservice/Maintenance Provider AIM"
)
{
//var index = parentNode.
// directories[8];
//var index = directories[7];
}
else
{
parentNode.Nodes.Add(node);
}
//RadTreeNode nodeSideLetters = new RadTreeNode("/Customers/Maines Paper & Foodservice/Side Letters");
//parentNode.Nodes.Add(nodeSideLetters);
}