RadTreeView inside RadComboBox

2 posts, 0 answers
  1. Vitaly
    Vitaly  avatar
    76 posts
    Member since:
    Aug 2011

    Posted 19 Nov 2013 Link to this post

    the following code is in my aspx page:
     <telerik:RadComboBox ID="RadComboBoxStatusGrp" runat="server" Width="125px"
                 Height="150px" Font-Size="Small" CssClass="txtinput" AutoPostBack="false"
                 EmptyMessage="Choose a Status" ShowToggleImage="true"

           <div id="div1">
           <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking">
              <telerik:RadTreeNode runat="server" Text="TR" Expanded="true" >
                <telerik:RadTreeNode runat="server" Text="Approved"  >
                 <telerik:RadTreeNode runat="server" Text="Entered"  >
                 <telerik:RadTreeNode runat="server" Text="All Trans" >
                 <telerik:RadTreeNode runat="server" Text="Processed"  Expanded="true"></telerik:RadTreeNode>
                 <telerik:RadTreeNode runat="server" Text="All" Expanded="true"></telerik:RadTreeNode>
            <telerik:RadComboBoxItem Text="" />
          <script type="text/javascript">
              var div1 = document.getElementById("div1");
              div1.onclick = StopPropagation;

    In C# on page_load event I am reading SP and get field call RunFlag.
    If RunFlag == "I"
     disable "Processed" node.
    How can I do that?

    Thanks so much for your help
  2. Kate
    Kate avatar
    1898 posts

    Posted 20 Nov 2013 Link to this post

    Hi Vitaly,

    You can easily find the RadTreeVIew control in the RadComboBox by using the following code
    var treeviewInCombo= RadComboBox2.Items[0].FindControl("RadTreeView1");

    After you get reference to the needed control you can set the desired node as per your requirements. Here is a help article that you can refer that can provide you more information and sample how to find the 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 the blog feed now.
Back to Top