We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding Child Nodes

Thread ID:





21420 Nov 9,2004 09:10 PM UTC Nov 10,2004 02:37 PM UTC WinForms 1
Tags: Tools
Felix DeHerrera
Asked On November 9, 2004 09:10 PM UTC

Hi, I am trying to recursively add nodes to the treeviewadv control. What I need is a way to get the index of the last node added to the tree so that any children can be appropriately added to the Nth child. I am using the following code which is not working.. Any help is appreciated. ''-- Get data dbSubCategoryInfo = dbSubCategory.GetData(iCatID) ''-- Prep for loop iArrayLen = UBound(dbSubCategoryInfo) ''-- Add Child Nodes For iNdx = 0 To iArrayLen oNode = New TreeNodeAdv oNode.Text = dbSubCategoryInfo(iNdx).Name oNode.Tag = CStr(dbSubCategoryInfo(iNdx).ID) ''-- Add the new node to the tree.. If iNode < 0 Then iNode = oTree.Nodes.Add(oNode) Else iNode=oTree.Nodes(iNode).Nodes.Add(oNode) End If ''-- Load any child nodes...(recurse) LoadChildNodes(oTree, dbSubCategoryInfo _ (iNdx).ID, iNodeIndex) Next

Administrator [Syncfusion]
Replied On November 10, 2004 02:37 PM UTC

Nevermind... figured it out.. thanks..


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon