The below code used to work just fine as I recall. However, either I can't
get this to work correctly anymore due to a bug in my code or there's
something wrong with 11.1 UltraWinTree. Does this algorithm look right?
Thanks in advance, Don Bouchard
I'm calling this as follows:
utNodeFound = FindNode(utAccounts, nothing, "KEYDESIRED")
Private Function FindNode(ByVal ut As UltraWinTree.UltraTree, ByVal utNode As UltraWinTree.UltraTreeNode, ByVal strKey As String) As UltraTreeNode Dim utNodes As TreeNodesCollection ' If utNode is null, then assume we're starting at the top of the tree ' otherwise, get this level's nodes and search them for a match If utNode Is Nothing Then utNodes = ut.Nodes Else utNodes = utNode.Nodes End If ' Now search in this level's nodes collection for a match For Each utn As UltraTreeNode In utNodes If String.Compare(utn.Key.Trim, strKey.Trim, True) = 0 Then Return utn End If If utn.HasNodes Then Return FindNode(ut, utn, strKey) Next Return Nothing End Function
Hello Don,
I try to reproduce your scenario in a small sample following provided code. Could you please take a look at the attached sample where I made small changes into your code. Please let me know if you think that I didn`t reproduce your scenario or if you have any questions.
Regards
Have you been able to resolve your issue ? Did you have a time to take a look at the attached sample. If you have any questions, do not hesitate to ask me