set Enabled = "false" to radiobuttonlist then can not toggle enable/disable
- by cindy
I am able to use jquery toenable/disable radiobuttonlist based on the checkbox value. But the problem is that I want to disable radiobuttonlist at the first time. Then toggle its enable/disable by checkbox later. So I have
But after I add: Enabled = "false" to my radiobuttonlist, the toggle of checkbox does not work.
Here is my function to toggle :
$(function() {
function checkBoxClicked() {
var isChecked = $(this).is(":checked");
var columnName = "rblColumn" + $(this).parent().attr("alt");
if (isChecked) {
$("#" + columnName).removeAttr("disabled");
} else {
$("#" + columnName).attr("disabled", "disabled");
}
}
//intercept any check box click event inside the #list Div
$(":checkbox").click(checkBoxClicked);
});