Thank you Cetin. Thats an excellent article you wrote. I will be using a lot as this is my first crack at the Treeview control.
>Instead of node index directly use the node key. It's typically is your character primary key. ie: nodes(nIndex) and nodes('00004') both work. You don't need to follow indexes. Table looks like :
>
>
>NodeKey ParentKey NodeText
>------------- --------- --------
>charles_mary Root parents
>sue Charles_Mary Sue is single
>fred_beth Charles_Mary Fred and Beth were married in 1997
>
>NodeKey is char and your table's PKId.
>nodes('sue') work whatever its current index is. Check UT magazine June issue for sample with testdata and folders (with code).
>Cetin
>
>>Hi,
>>
>>Thanks for your reply. I realized the way I am doing this will not work and in the long run give more troubles. Do you know of a good way I could 'relate' the treeview to a table? For example, if I click on a leaf or node how can I determine which record in my table this corresponds to. I was using the node.index before but I don't think this will work.
>>
>>Thanks,
>>Chris