document.getElementById('Id of the combo box').disabled=true;
I am unable to do so. Please advice on how to proceed.
6 Answers, 1 is accepted
This does not work:
var cb = document.getElementById("<%= RadComboBoxBIN.ClientID %>");
I have to use document.getElementById because $find returns null.
Why can I not use enable()/disable() now? What do I use instead?
This also does not enable or disable the combobox. It does not cause an error like enable()/disable() does but it has no effect.
"<%= RadComboBoxBIN.ClientID %>").disabled = false;
"<%= RadComboBoxBIN.ClientID %>").disabled = true;
Does anyone have any ideas?
If you are trying to disable it when the page loads. I assume you are trying to disable/enable when the page loads, if you get null from $find. You would have to do this to disable the RadComboBox:
You would create another one that would do the reverse.
I hope that helps.
The document.getElementById returns a DOM object, and $find returns the AJAX control client-side object.
I will recommend you use $find to get the RadComboBox client-side object, and after that use the enable() and disable() functions.
Please find more details about RadComboBox client-side methods and properties here.
the Telerik team