Combo Box dropdown getting locked with treeview inside

2 posts, 0 answers
  1. A K
    A K avatar
    49 posts
    Member since:
    Apr 2010

    Posted 02 Jun 2010 Link to this post

    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();

            }

        }

  2. Yana
    Admin
    Yana avatar
    4831 posts

    Posted 07 Jun 2010 Link to this post

    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.
Back to Top