• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

itemdata in Treeview?

I am populating a treeview control from a database field and I would like to store an index like the itemdata in listbox fo rfuture reference. What is the equivalent to that in TV?
0
zachvaldez
Asked:
zachvaldez
1 Solution
 
DabasCommented:
Hi zachvaldez,
Since you probably are using a node object to add items to the tree, try using the node's Tag property for your itemdata

Dabas
0
 
Shiju SasidharanAssoc Project ManagerCommented:
hi
if ur index values are unique then u can keep index as Node key , but preceed it with a text
that is
'--------------------------------------------------------------
'   here ":::" is used as a unique text put before ur index value
'Also if u want to get it back just replace this ":::"
'    Index=CLng(Replace(nd.Key,":::",""))
'

Dim nd as Node
Set nd = TreeView1.Nodes.Add(, , ":::" & Your_Index_Number , "Node_Text")
'----------------------------------------------------------------

;-)
Shiju
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now