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

Tree Expand Collapse problem in firefox

1 Answer 54 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Fenil
Top achievements
Rank 1
Fenil asked on 10 May 2013, 08:55 AM
I have radtreeview inside radcombobox.

 <telerik:RadComboBox ID="cbTreeViewSelect" runat="server"  ShowToggleImage="True" Skin="Metro" 
                    Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
                    EmptyMessage="Choose a kit" ExpandAnimation-Type="None" CollapseAnimation-Type="None"
                    Font-Bold="true" AutoPostBack="true" Height="350px" CssClass="NormalText12Combo" OnTextChanged="cbTreeViewSelect_TextChanged">
                    <ItemTemplate>
                    
                        <telerik:RadTreeView runat="server" ID="tvTree" OnClientNodeClicking="nodeClicking"
                            CssClass="NormalText12Combo" Width="100%" Height="340px" OnNodeClick="tv_NodeClick"
                            OnDataBound="tvTree_DataBound" />
                           
                    </ItemTemplate>
                    <Items>
                        <telerik:RadComboBoxItem Text="" />
                    </Items>
                </telerik:RadComboBox> 



and scripts as described below.

function nodeClicking(sender, args) {
        var comboBox = $find("<%=cbTreeViewSelect.ClientID %>");
        
        var node = args.get_node()

        var g = node.get_value();
       
        if (g == "0") {
            args.set_cancel(true);
            node.toggle();
            comboBox.attachDropDown();
            comboBox.expand();
        }
        else {
            comboBox.set_text(node.get_text());

            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_text(node.get_text());
            comboBox.commitChanges();

            $("#<%=hidValue.ClientID %>").val(node.get_value());

            comboBox.hideDropDown();
        }
        // Call comboBox.attachDropDown if:
        // 1) The RadComboBox is inside an AJAX panel.
        // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node.
        // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel.

        //comboBox.attachDropDown();
    }

    function StopPropagation(e) {
        if (!e) {
            e = window.event;
        }

        e.cancelBubble = true;
    }

    function OnClientDropDownOpenedHandler(sender, eventArgs) {
        var tree = sender.get_items().getItem(0).findControl("tvTree");
        var selectedNode = tree.get_selectedNode();
        if (selectedNode) {
            selectedNode.scrollIntoView();
        }
    }


In IE its working fine but in firefox when i click on hyperlink of top node of treeview it expands the tree but it hides(collapse) dropdown..

i want to keep that treeview and dropdown expanded.

Please help.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 14 May 2013, 03:58 PM
Hi Fenil,

We have newly released DropDownTree control that our of the box combines RadTreeView and RadComboBox. I strongly suggest that you take a look at as we've aimed to solve there all known integration issues .

All the best,
Genady Sergeev
the Telerik team
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 their blog feed now.
Tags
DropDownTree
Asked by
Fenil
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or