I have a table which renders some data from the Model and Controller. I have the table working, however, is there a way that I can stop the checkboxes in the table being clicked.
My code is:
<tbody>
@for(var i = 0; i < Model.Writers.Count(); i++)
{
<tr data-id="@Model.Writers[i].WriterId"
data-name="@Model.Writers[i][email protected][i].LastName"
data-membership="@Model.Writers[i].Membership"
data-capipinumber="@Model.Writers[i].CaeIpiNumber"
data-share="@Model.Writers[i].Share"
date-righttocollect="@Model.Writers[i].RightToCollect">
<td>@Model.Writers[i].FirstName @Model.Writers[i].LastName</td>
<td class="hidden-xs hidden-sm">@Model.Writers[i].Membership</td>
<td class="hidden-xs">@Model.Writers[i].CaeIpiNumber</td>
<td>@Model.Writers[i].Share</td>
<td class="hidden-xs hidden-sm text-center">
@Html.CheckBoxFor(m => m.Writers[i].RightToCollect, new { @class = "control-label" })
</td>
</tr>
tableRowIndex++;
}
</tbody>
I am just a little unsure whether it is possible to make the checkboxes no clickable, so they are locked in a way.
checkedattribute value? The checkbox state is defined by result of expression, that you passed as first argument of the helper methoddisabledattribute?