Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  Tree Control in DNN
Previous Previous
 
Next Next
New Post 5/12/2006 2:34 PM
User is offline Dylan Barber
651 posts
7th Ranked


Tree Control in DNN 

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)

 
New Post 5/14/2006 8:45 PM
User is offline Dylan Barber
651 posts
7th Ranked


Re: Tree Control in DNN 

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 ?

 

 
New Post 5/15/2006 7:35 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: Tree Control in DNN 

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 9:08 AM
User is offline Dylan Barber
651 posts
7th Ranked


Re: Tree Control in DNN 

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?

 
New Post 5/15/2006 1:33 PM
User is offline Dylan Barber
651 posts
7th Ranked


Re: Tree Control in DNN 

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?

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  Tree Control in DNN
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
DNN Photo Gallery is a truly unique photo management module released January 1st 2006. With DNN Photo Gallery you can REALLY integrate images into your existing portal and make them look like they were designed for your site.
DNN Photo Gallery
Swirlhost Inc.
Affordable DotNetNuke Hosting, Skin Development, Custom Module Development, and DotNetNuke Consulting. We will install your preference of DNN and now host with us and get a free license for the Swirl AJAX Chatroom Module.
www.swirlhost.com
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP