Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Check All Checkbox in Razer MVC html table

I need to implement check all checkbox which will check and uncheck the checkboxes in rows.

   <table id="instruments" class="table table-bordered table-striped table-condensed table-hover smart-form has-tickbox" style="width: 100%;">
    <thead>
        <tr>
            <th>
                                                               
                <input type="checkbox"/>
                                                               
            </th>
                                                            
            <th data-class="expand" style="white-space: nowrap">@Model.SResource</th>
            <th data-hide="phone" style="white-space: nowrap">@Model.KResource</th>
            <th data-hide="phone" style="white-space: nowrap">@Model.LocationResource</th>
        </tr>
    </thead>
    <tbody>
        @for (int i = 0; i < Model.Instruments.Count; i++)
        {
            var values = Model.Instruments[i].Value.Split('~');
            var status = values.Length > 0 ? values[0] : "";
            var location = values.Length > 1 ? values[1] : "";

            <tr>
               <td>
                   <label class="checkbox">
                         @Html.CheckBoxFor(m => m.Instruments[i].Selected)
                         <i></i>
                    </label>
                </td>
                <td><label>@Model.Instruments[i].Text</label></td>
                <td><label>@status</label></td>
                <td><label>@location</label></td>
            </tr>
                                                        }
    </tbody>
</table>

on this table @Html.CheckBoxFor is setting selected in model which I want it to remain as it is. Can anyone help?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!