Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPITree Control in DNNTree Control in DNN
Previous
 
Next
New Post
5/12/2006 4:34 PM
 

Having looked through the filemanager to figure out a little about using this control I cant seem to figure out how to attach the treenodes collection to the DNNtree control on the page

 

Can someone please tell me what I missed - heres what I have so far

Dim myTreeNodes As TreeNodeCollection

AddNode("test1", "a1", eImageType.Folder, myTreeNodes)


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/14/2006 10:45 PM
 

Okay I have worked on this all weekend and really getten nowhere (even while drunk) :)

I have used the webcontrols examples Jon has on his blog but the problem is those are all based on using the file system for the content - I want to add my own nodes by using some sort of addnodes function

I tried creating Nodes by using this

 

Me.MyDNNTree.PopulateNodesFromClient = True
                Me.MyDNNTree.ForceDownLevel = False
                Me.MyDNNTree.CheckBoxes = False
                Me.MyDNNTree.JSFunction = "myTestFunction('TestParam1', 'TestParam2');"
                Me.MyDNNTree.Target = "MyTarget"

MyDNNTree.IndentWidth = 20
                MyDNNTree.TreeNodes.Clear()

                Dim objNode As DotNetNuke.UI.WebControls.TreeNode = New DotNetNuke.UI.WebControls.TreeNode("root")
                objNode.Key = "test1"
                objNode.ToolTip = "Test2"
                objNode.Text = "this is a thing"
                MyDNNTree.TreeNodes.Add(objNode)

 

But it doesnt show anything - how can I add a node or some sort of subnode ?

 


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/15/2006 9:35 AM
 

Not sure what example you are trying, but here is what I did to try and reproduct your problem.

1)  Download the source version of the webcontrol project here.

2) Create a new sub called test with your code in it.

Private Sub Test()

Me.MyDNNTree.PopulateNodesFromClient = True

Me.MyDNNTree.ForceDownLevel = False

Me.MyDNNTree.CheckBoxes = False

Me.MyDNNTree.JSFunction = "myTestFunction('TestParam1', 'TestParam2');"

Me.MyDNNTree.Target = "MyTarget"

MyDNNTree.IndentWidth = 20

MyDNNTree.TreeNodes.Clear()

Dim objNode As DotNetNuke.UI.WebControls.TreeNode = New DotNetNuke.UI.WebControls.TreeNode("root")

objNode.Key = "test1"

objNode.ToolTip = "Test2"

objNode.Text = "this is a thing"

MyDNNTree.TreeNodes.Add(objNode)

End Sub

3) Comment out the call to SetTreeDefaults() and call Test() in stead in Page_Load

'SetTreeDefaults()

Test()

4) Tested page.  This code worked and showed your single node.  The image was messed up, but I don't think that is your concern at the moment.

If you are still having trouble with this sample I think I may need some more info from you.

 


 
New Post
5/15/2006 11:08 AM
 

Okay I can get that -

 

Now what am I missing when I try this in a module?  I basically just moved this code into a module - Am I missing something else?


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/15/2006 3:33 PM
 

Okay that makes sense now that I fixed my install of DNN - didnt notice it but the whole thing was tosted the regular FileManager in the admin section didnt work either

 

Anyway..................

Now that I can add root nodes how do i add child nodes?


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPITree Control in DNNTree Control in DNN


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out