c# - TreeView value for Node -


im using code create node:

private void radbutton4_click(object sender, eventargs e)         {             this.radtreeview1.nodes.add(new radtreenode("personal folders"));             this.radtreeview1.nodes[0].nodes.add(new radtreenode("simpson"));             this.radtreeview1.nodes[0].nodes.add(new radtreenode("maggy"));              this.radtreeview1.nodes.add(new radtreenode("friends"));             this.radtreeview1.nodes[1].nodes.add(new radtreenode("pig"));             radtreeview1.expandall();         } private void radtreeview1_selectednodechanged(object sender, radtreevieweventargs e)         {                        messagebox.show(e.node.text);         } 

and result perfect:

http://i.stack.imgur.com/rruu3.png

but need set value every node es: if click on maggy return 12121

all content dynamic while.

i'm in trouble, can me please?

you should set value while adding radtreenode, in way can retrieve value of radtreenode too.

    radtreenode newnode = new radtreenode();     newnode.text = "maggy";     newnode.value = "12121"; 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -