This is a migrated thread and some comments may be shown as answers.

RadTreeView inside RadComboBox

1 Answer 47 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Vitaly
Top achievements
Rank 1
Vitaly asked on 19 Nov 2013, 06:19 PM
Hi,
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"
              OnClientDropDownOpened="OnClientDropDownOpenedHandler">

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

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

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 20 Nov 2013, 10:01 AM
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.

Regards,
Kate
Telerik
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.
Tags
TreeView
Asked by
Vitaly
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or