I have a dynamic set of checkboxes which are already mark. When I click one out of it then all the below checkboxes should be unchecked and if re mark again all the above checkbox mark again. Is there anyone who can help me on this please?
Thank you.
@for (int i = 0; i < Model.transportDate.Count(); i++)
{
<tr>
<td>
@Html.CheckBoxFor(Model => Model.transportDate[i].selection)
</td>
<td>
@Html.TextBoxFor(Model => Model.transportDate[i].Date)
</td>
</tr>
}
You can do it on the Client side using
javascript
. See example.