Radtreeview with Radcombobox

3 posts, 1 answers
  1. mayur
    mayur avatar
    6 posts
    Member since:
    Mar 2015

    Posted 15 Apr 2015 Link to this post

    I am working on radcombobox and radtreview with checkbox property, where when i am cheking nodes from radtreeview that checked item  text must be shown.but three requirment  that is
    1.if parent node is checked all child node must be checked and there text must be shown on radcombobox
    2.if any one of child is unchecked then parent node must be unchecked
    3.if all child node is checked then automatically parent node must be checked.
    without using tristate,and checkchild node property.becoz if i use tristate property then text of parent child is also shown in radcombobox even all child is not checked.

    so i want help for 3rd option i.e if all child node is checked then parent node must be checked withoout using tristate property. in my example i have 2 parent each parent have two child so how to identify that this particular parent have some child. 

    reason behind to disabled tristate property is if any one of child is checked  then it shows the text of that child aloong with that parent child which i dont want.

  2. mayur
    mayur avatar
    6 posts
    Member since:
    Mar 2015

    Posted 15 Apr 2015 in reply to mayur Link to this post

    this is source view

         <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select the bikes" Height="128px" Width="411px">
            <telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="true" OnClientNodeChecked="OnClientNodeChecked">
                    <telerik:RadTreeNode runat="server" Text="bikes" >
                            <telerik:RadTreeNode runat="server" Text="apache"></telerik:RadTreeNode>
                            <telerik:RadTreeNode runat="server" Text="pulsar"></telerik:RadTreeNode>
                    <telerik:RadTreeNode runat="server" Text="cars" >
                            <telerik:RadTreeNode runat="server" Text="mustang"></telerik:RadTreeNode>
                            <telerik:RadTreeNode runat="server" Text="audi"></telerik:RadTreeNode>
            <telerik:RadComboBoxItem Text="" />


    ​now when i use tristate property and if i checked any one child parent also checked and it shows the text of parent and child also which i dont want. i want only if all child checked then only parent is checked and shows its text.

  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Magdalena avatar
    411 posts

    Posted 17 Apr 2015 Link to this post

    Hello Mayur,

    Thank you for contacting Telerik support.

    We recommend you to use RadTreeView control for this purpose, instead of using RadComboBox with RadTreeView in an item template.

    Accessing RadTreeView in the RadDropDownTree control in code behind can be achieved by RadDropDownTree1.EmbeddedTree. You can find more detailed information about it in our documentation article about Accessing the Embedded Tree in the DropDown.

    Expanding and collapsing nodes can be achieved by the methods expand() and collapse(). We would like to refer you to our article about collapsing and expanding nodes in RadTreeView.

    Do not hesitate to contact us if you have other questions.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top