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

enable / dosable RadCombobox

1 Answer 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sofiene
Top achievements
Rank 1
Sofiene asked on 17 Apr 2012, 09:49 AM

hi ,
I have a RadComboBox in my RadGrid Edit Form , when item created i catch the element asked in question ans his RequereFieldValidator  clientId .  In a JavaScript function i like to manipulate this too edit form control but that not worked : manipulate disabled / enabled property not disable / enable my control in form .


my C# code :
var radMotif = (RadComboBox)editFormItem.FindControl("IdMotifRejet");
var requiredradMotif = editFormItem.FindControl("RequiredFieldValidatorMotifRejet");  
  
GridPJ.Controls.Add(new LiteralControl("<script type='text/javascript'>window['IdMotifRejet'] = '" + radMotif.ClientID + "';</script>"));
GridPJ.Controls.Add(new LiteralControl("<script type='text/javascript'>window['RequiredFieldValidatorMotifRejet'] = '" + requiredradMotif.ClientID + "';</script>"));
my Javascript Function

var cIdMotifRejet = document.getElementById(window['IdMotifRejet']);                      
cIdMotifRejet.disabled = false;
document.getElementById(window['RequiredFieldValidatorMotifRejet']).disabled = false;

1 Answer, 1 is accepted

Sort by
0
Sofiene
Top achievements
Rank 1
answered on 19 Apr 2012, 01:34 PM
document.getElementById get the control but without all of his property/methods , must use

var cIdMotifRejet = $find(window['IdMotifRejet']);
 cIdMotifRejet.disable();
Tags
ComboBox
Asked by
Sofiene
Top achievements
Rank 1
Answers by
Sofiene
Top achievements
Rank 1
Share this question
or