Set selected text

2 posts, 0 answers
  1. robert
    robert avatar
    4 posts
    Member since:
    Oct 2011

    Posted 21 May 2013 Link to this post

    I have a RadDropDownTree and i want to set the selected value, I do this with the ddtDiagCategorie_OnNodeDataBound, my node is selected in the list when i open it, but th text is not dispay at first time, I tried with DefaultMessage property with no result. I was thinking that the right manner was using the SelectedText or SelectedValue like a normal dropdown, but th property is readonly, how does I have to do this. (The big consequence is after a modify, if the user don't go to selecte the value in the DropDownTree, he save an empty value in the database...)

    My code on the event :

    protected void ddtDiagCategorie_OnNodeDataBound(object sender, DropDownTreeNodeDataBoundEventArguments e)
                if (BilletCourant != null && BilletCourant.IdCategorie.HasValue)
                    if (e.DropDownTreeNode.Value.Equals(BilletCourant.IdCategorie.Value.ToString()))
                //ExpandAllNodes sur ce contrôle
                e.DropDownTreeNode.Expanded = true;

  2. Kate
    Kate avatar
    1898 posts

    Posted 23 May 2013 Link to this post

    Hello Robert,

    Please refer to the following help article where you can get more information and an example demonstrating how to set specific nodes to be selected (checked) - How to Create An Entry or Select a Node

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top