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.
<%@ 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>