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

Combo Box dropdown getting locked with treeview inside

1 Answer 54 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
A K
Top achievements
Rank 1
A K asked on 02 Jun 2010, 03:05 PM

I have a combobox with RadTreeview inside it.

I have Ajaxified this tree view to update Panel on the page.

Once I click item from a treeview dropdown gets locked. If I click somwhere on the page than again I am able to select Item from a tree view.

This is the code for combobox and Ajaxification

Actual combobox Markup:

  <telerik:RadComboBox ID="cboCategory" runat="server" Skin="Vista"

                    OnClientDropDownOpened="OnClientDropDownOpenedHandler" AutoPostBack="false"

                    meta:resourcekey="cboCategory"   AppendDataBoundItems="true" Width="290px" MaxHeight="110px" >

                        <ItemTemplate>

                            <telerik:RadTreeView ID="tvCategory" runat="server" Skin="Vista"

                            OnClientNodeClicking="nodeClicking" onnodeclick="tvCategory_NodeClick" EnableEmbeddedScripts="true" AutoPostBack="false" >

                            </telerik:RadTreeView>

                        </ItemTemplate>

                        <Items>

                           <telerik:RadComboBoxItem Value="0"/>

                       </Items>

                    </telerik:RadComboBox>

 

Ajax Settings:

<telerik:AjaxSetting AjaxControlID="tvCategory">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" LoadingPanelID="RadAjaxLoadingPanel1" />            

                </UpdatedControls>

        </telerik:AjaxSetting>

 

      function nodeClicking(sender, args) {

            var comboBox = $telerik.findControl(document, "cboCategory");

            var node = args.get_node()

 

            comboBox.set_text(node.get_text());

 

            comboBox.trackChanges();

            //comboBox.get_items().getItem(0).set_value(node.get_text());

            //comboBox.commitChanges();

 

            var cboItem = comboBox.get_items().getItem(0);

            cboItem.set_value(node.get_text());

            comboBox.set_text(node.get_text());

 

            comboBox.commitChanges();

 

 

            comboBox.hideDropDown();

       }

 

    function StopPropagation(e) {

        if (!e) {

            e = window.event;

        }

 

        e.cancelBubble = true;

    }

 

    function OnClientDropDownOpenedHandler(sender, eventArgs) {

        var treeName = "tvCategory";

        var tree = sender.get_items().getItem(0).findControl(treeName)

        var selectedNode = tree.get_selectedNode();

        if (selectedNode) {

            selectedNode.scrollIntoView();

        }

    }

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 07 Jun 2010, 01:54 PM
Hello,

I've tested the provided code but wasn't able to observe this issue, I've attached my test page for a reference.

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.
Tags
ComboBox
Asked by
A K
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or