Cannot expand RadTreeView in RadComboBox

3 posts, 0 answers
  1. VnDevil
    VnDevil avatar
    58 posts
    Member since:
    Oct 2012

    Posted 03 Jul 2010 Link to this post

    Hi Telerik,

    I cannot expand node when I set Enabled = false in ComboBox

    Here is my Code

    <script type="text/javascript" language="javascript"
                function nodeClicking(sender, args) { 
                    var comboBox = $find("<%= RadComboBox1.ClientID %>"); 
     
                    var node = args.get_node() 
     
                    comboBox.set_text(node.get_text()); 
     
                    comboBox.trackChanges(); 
                    comboBox.get_items().getItem(0).set_value(node.get_value()); 
                    comboBox.commitChanges(); 
     
                    comboBox.hideDropDown(); 
                } 
     
                function OnClientDropDownOpenedHandler(sender, eventArgs) { 
                    var tree = sender.get_items().getItem(0).findControl("RadTreeView1"); 
                    var selectedNode = tree.get_selectedNode(); 
                    if (selectedNode) { 
                        selectedNode.scrollIntoView(); 
                    } 
                } 
            </script> 


        <form id="form1" runat="server"
        <div> 
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
            <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="100%" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
                <Items> 
                    <telerik:RadComboBoxItem Text="None" Value="0" /> 
                </Items> 
                <ItemTemplate> 
                    <telerik:RadTreeView ID="RadTreeView1" runat="server" OnClientNodeClicking="nodeClicking"
                        <Nodes> 
                            <telerik:RadTreeNode runat="server" Text="Africa" Expanded="true"
                                <Nodes> 
                                    <telerik:RadTreeNode runat="server" Text="Egypt" Enabled="false"
                                        <Nodes> 
                                            <telerik:RadTreeNode runat="server" Text="Cairo"
                                            </telerik:RadTreeNode> 
                                        </Nodes> 
                                    </telerik:RadTreeNode> 
                                    <telerik:RadTreeNode runat="server" Text="South Africa"
                                        <Nodes> 
                                            <telerik:RadTreeNode runat="server" Text="Cape Town"
                                            </telerik:RadTreeNode> 
                                        </Nodes> 
                                    </telerik:RadTreeNode> 
                                    <telerik:RadTreeNode runat="server" Text="Kenya"
                                        <Nodes> 
                                            <telerik:RadTreeNode runat="server" Text="Nairobi" Value="1999"
                                            </telerik:RadTreeNode> 
                                        </Nodes> 
                                    </telerik:RadTreeNode> 
                                </Nodes> 
                            </telerik:RadTreeNode> 
                        </Nodes> 
                    </telerik:RadTreeView> 
                </ItemTemplate> 
            </telerik:RadComboBox> 
         
        </div> 
        </form> 

    Please help me to expand node when disabled
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 05 Jul 2010 Link to this post

    Hello,

    Please check this help article which explains how to expand a disabled node.


    Regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. VnDevil
    VnDevil avatar
    58 posts
    Member since:
    Oct 2012

    Posted 05 Jul 2010 Link to this post

    Thanks for your help
Back to Top