If we want to set value in CheckBoxFor value from script we can set value like this:
function EditAccessPrevilige(AccessPrivilegeID, LoginID, EmployeeAccessPrivilege, PayrollPrivilege) {
$('#AccessPrivilegeInfo_LoginID').val(LoginID);
if (EmployeeAccessPrivilege == "True")
document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = true;
else
document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = false;
if (PayrollPrivilege == "True")
document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = true;
else
document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = false;
return false;
}
Comments
Post a Comment