Home - Forums-.NET - FlyTreeView (ASP.NET) - Syntax, to add nodes

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Syntax, to add nodes
Link Posted: 07-Aug-2006 00:19
EvgenyT,

Ok I have tried everyway imanginable to declare this control. Please if you have the syntax for that also it would be nice. I continue to not beable to expose the TreeNode node = TreeNode, my first error is Expresion is not a method, Node is not Declared, and TreeNode is not defined ...... Please Help


Thank you jim
Link Posted: 07-Aug-2006 14:43
ok drag and drop control to asp form

add imports namespace line to the asp html page



then in the aspx
Page Load event add this code

Dim node As New NineRays.Web.UI.WebControls.FlyTreeView.TreeNode()
        node.Key = \"nodeuniquekey\"
        node.Text = \"Text\"

        ' add root node to flytreeview 1
        FlyTreeView1.Nodes.Add(node)

        ' lets create child node
        Dim node2 As New _ NineRays.Web.UI.WebControls.FlyTreeView.TreeNode()
        node2.Key = \"nodeuniquekey2\"
        node2.Text = \"Text2\"

        ' add it as a child of parent (node)
        node.Nodes.Add(node2)

        Dim node3 As New _ NineRays.Web.UI.WebControls.FlyTreeView.TreeNode()
        node3.Key = \"nodekey3\"
        node3.Text = \"Text3\"
        node2.Nodes.Add(node3)

thank you for all your help, hope all that have reviewed these posts, finds this information helpful
Jim