I have this kind of structure:

Radio Buttons:

o Enable o Disable

Check Boxes





The Above controls are generated dynamically.

<asp:RadioButtonList runat="server" ID="rbSubsidiaries" onclick = "Radio_Click()"/>

 <asp:CheckBoxList runat="server" ID="cblSubsidiaries" Enabled="False"/>

What I want is: When the user click on the RadioButton Enable All the checkboxes get enable otherwise disable.

I am at the point where I can see that if the user has clicked on enable radio button.

 function Radio_Click() {
 if ($('#<%=rbSubsidiaries.ClientID %> input:checked').val() == 'enable') {
            alert('enable is clicked');

But I don't know how to enable all the checkBoxes.

Related posts

Recent Viewed