//Get the tree object from the arguments array. TreeNodeCollection tree = (TreeNodeCollection)args[0]; //Add a new folder named "Custom Items" to contain our new custom items //and then add it to the tree. TreeNode folder = new CustomTreeFolder("Custom Items"); tree.Add(folder); //Add a new custom item to the folder, with the name My Test Item 0 //passed into the constructor of the item. Use the icon TreeNode item0 = new CustomTreeNode("My Test Item 0"); item0.ImageName = "TreeActiveRole.png"; folder.Nodes.Add(item0); //Add a new custom item to the folder, with the name My Test Item 1 //passed as the Text property of the item TreeNode item1 = new CustomTreeNode(); item1.Text = "My Test Item 1"; item1.ImageName = "DropDownArrow.png"; folder.Nodes.Add(item1); //Add a new custom item to the folder, with the name My Test Item 2 TreeNode item2 = new CustomTreeNode("My Test Item 2"); item2.ImageName = "TreeActiveRole.png"; folder.Nodes.Add(item2);
System.Object
WebReports.UI.Controls.TreeNode
WebReports.UI.Controls.CustomTreeFolder