TreeView in ComboBox

Thread is closed for posting
6 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 22 Mar 2007 Link to this post

    Requirements

    RadControls version

    RadComboBox v2.6.0 and RadTreeView v6.1.0
    .NET version

    2.x
    Visual Studio version

    2005
    programming language

    C#
    browser support

    all browsers supported by RadComboBox and RadTreeView




    PROJECT DESCRIPTION
    This approach is invalid for the current version of Telerik.Web.UI. However, a similar approach is demonstrated here: TreeView in Combo.


     
    PROJECT DESCRIPTION
    This project shows how to embed RadComboBox in RadTreeView while the combobox is in a callback mode.
  2. 39F9494E-A6A6-492D-8A79-DB9FC31F9F03
    39F9494E-A6A6-492D-8A79-DB9FC31F9F03 avatar
    5 posts
    Member since:
    Apr 2007

    Posted 11 May 2007 Link to this post

    This works fine, except when I combine the combobox with the RadAjaxManager control.

    When the page loads the first time, I can expand/collapse/select the RadTree nodes in the combobox.
    When another control causes an Ajax postback to update the combobox after I selected a TreeNode, I am no longer able to click the nodes and the combobox remains open.

    Also, because the combobox is populated on the first page load, the ItemsRequested function is never called.  If I skip the Populate() function on load, it will perform the load on demand, but has a funky side affect of only showing the 2 parent nodes (without any tree structure).

    Thanks for your help,

    Jeff
  3. E109225C-D1F9-4B7A-8B60-2F442984B3F3
    E109225C-D1F9-4B7A-8B60-2F442984B3F3 avatar
    2529 posts
    Member since:
    Jul 2017

    Posted 14 May 2007 Link to this post

    Hello Jeffrey,

    Thanks for bringing this to our attention.

    The problem was related to a bug in RadComboBox control. We have addressed the issue in the latest build. You can open a support ticket and we will send you a dev version of the latest build there.

    Looking forward to your ticket,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. BE764AEB-AD66-4D2B-8D4F-8635D03FA0F6
    BE764AEB-AD66-4D2B-8D4F-8635D03FA0F6 avatar
    131 posts
    Member since:
    Nov 2006

    Posted 18 May 2007 Link to this post

    Is the Javascript in this code sample an old workaround for the bug that has since been fixed? Or is it the standard way of integrating the radCombo and radTreeView?

    Here's why I ask. I need to implement a radGrid on which rows will be added and removed dynamicly at runtime by the user. Some of the cells will be radCombos with radTreeViews inside them. These will be dynamic and added/removed at runtime as well.

    I'm worried about the Javascript I see in this example because it looks very static and hard-coded. There are Javascript variables pointing to the combo text, value, and to the combo itself. Obviously, that would be very difficult to do in my scenerio above.

    Do I still need the Javascript? Also, it sounds like I'll need to request the latest HotFix to get this to work?

    Thank you,
    Terry
  5. 0B6465A9-1E50-435C-B637-614B0BBF8608
    0B6465A9-1E50-435C-B637-614B0BBF8608 avatar
    524 posts
    Member since:
    Feb 2007

    Posted 19 May 2007 Link to this post

    I believe this approach

    http://www.telerik.com/demos/aspnet/TreeView/Examples/Functionality/TreeViewComboBox/DefaultCS.aspx

    is much safer for including in complex edit forms embedded in rad Grid. The dropdown is simulated with just a textbox and an image and the javascript is very little compared to this example.
  6. 09A01BDA-2BD6-4B55-891A-93A73349B775
    09A01BDA-2BD6-4B55-891A-93A73349B775 avatar
    22 posts
    Member since:
    Apr 2007

    Posted 05 Aug 2007 Link to this post

    Hi, this solution is excelent. But I have a strange problem. If I use this solution in a new project it's work fine. But I Put it in my project, don't work.
    After disable many features of my project, I discover a cause of problem.
    Mi pages descend of MyPage class and in this class I use PageInit event for set Theme in Pages.

    In this cases an PostBack occours when I select item in a TreeView. If I comment the code, this example work fine.


    Code sample:
     
            public Page() 
            { 
                _createWindowController = false
                //Load += new EventHandler(InternalLoad); 
                Init += new EventHandler(InternalInit); 
                PreInit += new EventHandler(Page_PreInit); 
            } 
     
            void Page_PreInit(object sender, EventArgs e) 
            { 
                // Get the theme name from a QueryString variable 
                String ThemeName = Request.QueryString["thename"]; 
                if (ThemeName == null
                    ThemeName = "Default"
                this.Theme = ThemeName; 
            } 


Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.