This is a migrated thread and some comments may be shown as answers.

RadTreeNode .Text vs .Value

2 Answers 186 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Xorcist
Top achievements
Rank 1
Xorcist asked on 24 Sep 2015, 06:04 PM

Why do these two properties seems to conflict. I want to store an object in .Value and display a simple String in .Text, but it seems I can't do this...

The last one set always overrides the other.

2 Answers, 1 is accepted

Sort by
0
Xorcist
Top achievements
Rank 1
answered on 24 Sep 2015, 06:36 PM

Not sure if this is a bug, but doing this:

RadTreeNode type = parent.Nodes.Add("DisplayedText");
type.Value = 1;

does not work, but doing this does:

RadTreeNode type = new RadTreeNode("DisplayedTest");
type.Value = 1;
parent.Nodes.Add(type);

Why do they function differently?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Sep 2015, 11:48 AM
Hello John,

Thank you for writing.

By default, when RadTreeView is in unbound mode, modifying the Text or the Value property of a node will automatically update the other one if the node is already added to RadTreeView. This behavior can be controlled via the EditMode property of the TreeViewElement. Please refer to the TreeView >> Editing Nodes help article >> EditMode section.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Treeview
Asked by
Xorcist
Top achievements
Rank 1
Answers by
Xorcist
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or