I have a set of checkboxes (within a grid item template), and because of the way the page is I can't use a radio button.
I want to be able to only have ticked at a time.
So far I have added a class - chkPri.Attributes.Add("class", [String].Format("diags"))
and tried this jQuery - $('input.diags').not(this).prop('checked', false);
but the page is being rendered with the input inside a span with the class added to the span.
<input name="rpbOutcomes$i1$rgProcedures$ctl00$ctl07$chkPrimary" id="rpbOutcomes_i1_rgProcedures_ctl00_ctl07_chkPrimary" onclick="setDiags(this);" type="checkbox">
I have tried using inutAttribute but this wasn't being rendered.
I have also tried $("span[class='diags']").not(this).prop('checked', false); this finds the span but not the checkbox inside it.
Can anyone point me in the right direction.
Simply put I only want one checkbox to be ticked. The checkboxes are inside a grid.