how to store a data in treeview node key

  • Thread starter Thread starter minjingshu
  • Start date Start date
M

minjingshu

Bob
orderA 13
orderB 11

i want to know how to save 13 as node key of orderA
thx
 
i'm new to c#. didnt know much about controls,
but here's a solution, build your own treenode class

class MyTreeNode: TreeNode{
int key;
.........
}
 
Bob
orderA 13
orderB 11

i want to know how to save 13 as node key of orderA

Every TreeNode object has a .Tag property of type "object", which can
hold anything you like. You can add any object to it, and retrieve it
from it again when needed.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top