Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > RadCombo and treeview
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered RadCombo and treeview

Feed from this thread
  • Posted on Jun 7, 2011 (permalink)

    I am using the RadComboBox with an embedded RadTreeView in the combo box and there are 2 of these on the page.  The problem that I am having is when selecting a node in the tree on one of the combo boxes.  What happens is if I select one combo box and select a tree node it will update correctly, if I then switch to the other combo box and select a node on it's tree view it will select the tree node but not update the combo box.  Has anyone had this problem?  Basically is a problem of switching back an forth between combo boxes and not getting updated.

    Here is the page.
    <%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/MasterFiles/Main.master" CodeFile="ManageDemurrersEditor.aspx.cs" Inherits="BuildBrief_ManageDemurrersEditor" %>
    <%@ MasterType virtualPath="~/MasterFiles/Main.master" %>
      
      
    <asp:Content ID="cPageBody" ContentPlaceHolderID="cphPageBody" Runat="Server">
     <script type="text/javascript">
         if (typeof (RadEditorCommandList) != "undefined") {
             Telerik.Web.UI.Editor.CommandList["Save"] = function (commandName, editor, args) {
                 var btnSave = $get("<%=btnSave.ClientID%>"); //get a reference to the Asp:Button  
                 btnSave.click(); //click it programmatically  
             };
         }
         function OnClientNodeClickingHandlerDemurrers(sender, e) {
             var node = e.get_node();
             //check if we have clicked on a Make
             if (node.get_category() == "Make") {
                 node.toggle();
             }
             else {
                 //find the combobox, set its text and close it
                 var combo = $find("<%= radDemurrers.ClientID %>");
                 combo.set_text(node.get_text());
                 cancelDropDownClosing = false;
                 combo.hideDropDown();
             }
         }
         function OnClientNodeClickingHandlerCauseOfAction(sender, e) {
             var node = e.get_node();
             //check if we have clicked on a Make
             if (node.get_category() == "Make") {
                 node.toggle();
             }
             else {
                 //find the combobox, set its text and close it
                 var combo = $find("<%= radCauseOfAction.ClientID %>");
                 combo.set_text(node.get_text());
                 cancelDropDownClosing = false;
                 combo.hideDropDown();
             }
         }
      
    </script
        <div>
            <table>
                <tr>
                    <td>Select State:</td>
                    <td><telerik:RadComboBox ID="radState" runat="server" AutoPostBack="true" 
                            onselectedindexchanged="radState_SelectedIndexChanged"></telerik:RadComboBox> </td>
                </tr>
                <tr>
                    <td>Select Cause of Action (Optional)</td>
                    <td>
                        <telerik:RadComboBox ID="radCauseOfAction" EnableViewState="true" runat="server" Width="600px">
                            <ItemTemplate>
                                <div>
                                    <telerik:RadTreeView ID="tvCauseOfAction" runat="server" OnClientNodeClicking="OnClientNodeClickingHandlerCauseOfAction"></telerik:RadTreeView>
                                </div>
                                </ItemTemplate>
                                 <Items>
                                    <telerik:RadComboBoxItem />
                                </Items>
      
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td>Select Demurrer:</td>
                    <td>
                        <telerik:RadComboBox ID="radDemurrers" EnableViewState="true" runat="server" Width="600px">
                            <ItemTemplate>
                                <div>
                                    <telerik:RadTreeView ID="tvDemurrers" runat="server" OnClientNodeClicking="OnClientNodeClickingHandlerDemurrers"></telerik:RadTreeView>
                                </div>
                                </ItemTemplate>
                                 <Items>
                                    <telerik:RadComboBoxItem />
                                </Items>
                        </telerik:RadComboBox
                    </td>
                </tr>
                <tr>
                    <td>Enter Demurrer Description:</td>
                    <td>
                        <telerik:RadEditor ID="radCOAText" Runat="server" StripFormattingOnPaste="NoneSupressCleanMessage">
                           <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorTool Name="AjaxSpellCheck" />
                                    <telerik:EditorSeparator Visible="true" />
                                    <telerik:EditorTool Name="Cut" />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="PastePlainText" />
                                    <telerik:EditorTool Name="Bold" />
                                    <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="Underline" />
                                </telerik:EditorToolGroup>
                            </Tools>
                        </telerik:RadEditor>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" Text="Save" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Content>

  • Kate Kate admin's avatar

    Posted on Jun 10, 2011 (permalink)

    Hi b133,

    I noticed in your code that you set AutoPostBack to true only to the first ComboBox. Please try to set this property to true for the other controls as well and let me know if this helps.

    All the best,
    Kate
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > RadCombo and treeview