RadTreeNode .Text vs .Value

3 posts, 0 answers
  1. Xorcist
    Xorcist avatar
    92 posts
    Member since:
    Apr 2009

    Posted 24 Sep 2015 Link to this post

    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. Xorcist
    Xorcist avatar
    92 posts
    Member since:
    Apr 2009

    Posted 24 Sep 2015 in reply to Xorcist Link to this post

    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?

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 25 Sep 2015 Link to this post

    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
Back to Top