I have a checkbox that comes from DB inside repeater. I have to disable few checkboxes based on a click of one checkbox. and disable one particular checkbox based on the click of any other checkboxes.
<%# DataBinder.Eval(Container.DataItem, "PrivilegeDescription")%>
* <%# DataBinder.Eval(Container.DataItem, "Instruction")%>
protected void rptPrivilegeCheckboxes_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
string privValue = DataBinder.Eval(e.Item.DataItem, "PrivilegeID").ToString();
((CheckBox)e.Item.FindControl("chkPrivilege")).InputAttributes.Add("Value", privValue);
}
}
Amit MohantyPosted Feb 3, 2020, 10:51 PM
Priyanga SubramanianPosted Feb 3, 2020, 4:47 PM