Home Checkbox Into Grid.mvc
Reply: 0

Checkbox Into Grid.mvc

user1129 Published in April 22, 2018, 4:54 am

this is a grid mvc with column checkbox and column save. When the user click save it is possible take value from checkbox column? In this code ther's the set of checkbox from model and render from "o.Confirmation". I want to save the value (checked or unchecked) from page. It is possible use the clickfunction() Javascript for the checkbox? Thank you!!!

 @Html.Grid(Model).Columns(columns =>
    columns.Add(m => m.A).Titled("A").SetWidth(50);
    columns.Add(m => m.B).Titled("B").SetWidth(70);
    columns.Add(m => m.C).Titled("C").SetWidth(90);
    columns.Add(m => m.D).Titled("D").SetWidth(90);
    columns.Add(m => m.Confirmation).Titled("E?").Encoded(false).Sanitized(false).SetWidth(30).RenderValueAs(o => Html.CheckBox("checked",o.Confirmation));

            @<td style="font-size:large">
            <div>  @Html.ActionLink("Save", "SaveConfirmation", new {id = item.A,confirmation=item.Confirmation})  </div>
You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO