Drop down tree how to get parent,child node selected value client said code

2 posts, 0 answers
  1. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 30 Jan 2014 Link to this post

    Rad Drop down tree how to get parent,child   selected value  client said code
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jan 2014 in reply to NA Link to this post


    I guess you want to get the parent node and child node separately from the selected value of RadDropDownTree. Please have a look into the following code snippet.

    <telerik:RadDropDownTree ID="RadDropDownTree1" runat="server" CheckBoxes="SingleCheck"
        OnClientDropDownClosed="OnClientDropDownClosed1" DataSourceID="SqlDataSource1"
        DataFieldID="id" DataFieldParentID="parentid" DataTextField="text">

    <script type="text/javascript">
        function OnClientDropDownClosed1(sender, args) {
            for (var i = 0; i < sender.get_entries().get_count(); i++) {
                var item = sender.get_entries()._array[i].get_text();
                if (sender.get_embeddedTree().findNodeByText(item)._hasChildren() == true)
                    alert("Parent" + item);
                    alert("Child" + item);

    Please elaborate your requirement if it doesn't help.
Back to Top