Home Make a Checkbox none clickable ASP.NET MVC5
Reply: 0

Make a Checkbox none clickable ASP.NET MVC5

user1539
1#
user1539 Published in July 19, 2018, 9:58 am

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].FirstName@Model.Writers[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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.431367 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO