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

Disabling radComboBox loses treeview

1 Answer 24 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jeanne
Top achievements
Rank 1
Jeanne asked on 02 Jul 2012, 10:22 PM
I have a radComboBox containing a radTreeView for selection. It is based very strongly on one of the demos. It worked beautifully until I decided to enable/disable it in the client, based on other page events. Once the radComboBox has been disabled and re-enabled, the following lines of code in the radComboBox's OnClientDropDownOpened event handler throw an error because it can no longer find the control "rtvRights" in the item (oTreeView is undefined):
var oTreeView = sender.get_items().getItem(0).findControl("rtvRights");
var oSelectedNode = oTreeView.get_selectedNode();
As I said, this code works fine unless you disable and then enable the radComboBox using it's client-side disable/enable methods.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 04 Jul 2012, 03:15 PM
Hi Jeanne,

 
I have inspected the issue by adding the following code to our TreeView in ComboBox demo but unfortunately could not observe the unusual behavior by enabling and disabling the RadCombobox from the client:

    function OnClientClicked(sender, args) {
        var combo = $find('<%=RadComboBox1.ClientID %>');
        if (combo.get_enabled()) {
            combo.disable();
        }
        else {
            combo.enable();
        }
    }
 
   
</script>
<telerik:RadButton runat="server" ID="RAdButtopn1" AutoPostBack="false" OnClientClicked="OnClientClicked">
</telerik:RadButton>

Would you please expalin what else should be done in order to observe the described unusual behavior so we can be more helpful?

Kind regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Jeanne
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or