Hi all i am having two check box controls in my gridview what i need is if i checked a check box the other should be get enabled and if i uncheck it should get disable is there any way to do it.
I write this but i am not getting the required one
<script type="text/javascript">
function checkboxClick(checked, boxId) {
var childCheckbox = document.getElementById(boxId);
childCheckbox.disabled = !checked;
if(childCheckbox.disabled) //uncheck when disabled
childCheckbox.checked = false;
}
</script>
<asp:CheckBox ID="CheckBox1" runat="server" OnClientClick ="checkboxClick(this.checked);" />
<asp:CheckBox ID="boxId" runat="server" Enabled="false" /></div>