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

RAD ComboBox Enabling And Disabling

4 Answers 372 Views
Compression
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 16 Jul 2009, 03:59 AM
Hi,
I am using RAD Combox.
I need the code to make enable or disable the combox by using javascript.

Also one more problem I m facing..
If I am disabling the combox in server side code then I am not able to enable it in javascript.

I use the following line of code in javascript to disable

document.getElementById(rcComboBox).disabled =

true;

My requirement is ..

One text box and one radcombobox are there.

Based on some value in the textbox, I have to make disable and enable the combobox and also select value in combox will get change based on the textbox value.

 

4 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 16 Jul 2009, 11:56 AM
Hi Joe,


Best wishes,
Simon
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Anne
Top achievements
Rank 1
answered on 22 Jan 2014, 08:07 PM
I am trying to enable/disable a RadComboBox control using Javascript.  I found this support item, and as suggested I tried to use the Client-side enable and disable methods.   None of the Client-side methods work for me.  Also, I can not use "var combo = $find("<%= RadComboBox1.ClientID %>");" to get a reference to the RadComboBox control.  They don't work for me. 
I have to use "document.getElementById(rcComboBox).disabled =true", just like Joe states, in order for me to get the reference.  ?????
I'm not sure why I can't use anything that you've suggested. 
Could it be because I am using the .NET 3.5 DLL, and not the 4.0 or 4.5 DLLs?  
I am applying the RadControls to a .aspx file which is deployed to a SharePoint 2010 platform. 
0
Boyan Dimitrov
Telerik team
answered on 27 Jan 2014, 10:00 AM
Hello,

I would like to clarify that we are not aware of such problem with finding the RadComboBox object when this line of code is used "var combo = $find("<%= RadComboBox1.ClientID %>");"


Since you are able to find the DOM element if you use this line of code document.getElementById(rcComboBox)you can find the RadComboBox client-side object using this expression: var combo = $find(rcComboBox).

Please note that the reason for this problem could not be due to the fact you are using .NET 3.5. This functionality works fine with .NET 3.5, 4.0 and 4.5




Regards,
Boyan Dimitrov
Telerik
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 the blog feed now.
0
SURYA
Top achievements
Rank 1
answered on 27 May 2015, 06:24 AM

Hi,

I m Creating Telerik RadCombobox dynamically inside the repeater, how to get the selected item's text and value of it from javascript by using its id. For using "$find()" whether i have to include any other js file?

 

Thanks,

 

Surya prakash R

Tags
Compression
Asked by
Joe
Top achievements
Rank 1
Answers by
Simon
Telerik team
Anne
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
SURYA
Top achievements
Rank 1
Share this question
or