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

Cannot expand RadTreeView in RadComboBox

2 Answers 40 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
VnDevil
Top achievements
Rank 2
VnDevil asked on 03 Jul 2010, 08:52 PM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 05 Jul 2010, 02:23 PM
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
0
VnDevil
Top achievements
Rank 2
answered on 05 Jul 2010, 06:26 PM
Thanks for your help
Tags
ComboBox
Asked by
VnDevil
Top achievements
Rank 2
Answers by
Yana
Telerik team
VnDevil
Top achievements
Rank 2
Share this question
or