hi,
i have a application in which my need is to make a child checkbox enabled false on page load.When user clicks on parent checkbox ,child checkboxes become enabled true.
i have used javascript to achieve this function.
my javascript goes like this
for (i=1; i<inputs.length; i++) //if childNode type is CheckBox
{
if (inputs[i].type =="checkbox")
{
var chk=$get(inputs[i].id);
if(id.checked == true)
{
chk.parentElement.removeAttribute('disabled');
}
else
{
chk.parentElement.setAttribute('disabled','true');
}
}
in edit mode of the page i want the checkboxes checked by the user to be enabled.
but when iam using code to enable true.iam not able to do it.
my code in server side
chk.Attributes.Add("disabled", "false");
chk.Checked = true;
but iam not achieve this.
can any one solve my problem.