@using (Html.BeginForm("Update", "MyUsers", FormMethod.Post))
{
@(Html.Kendo().Grid(Model).Name("Usersgrid").Columns(col =>
{
col.Bound(i => i.Id).Hidden();
col.Bound(b => b.Email);
col.Bound(p => p.UserActive).ClientTemplate("<input type='checkbox'
name='checkedvalues' class='chkbx'
value='#= Id #' " + "# if (UserActive)
{ #" + "checked='checked'" + "# } #" + "/>" +
" <input type=\"hidden\" name=\"checkedvals\"
value=\"#=Id#\"/>")
.HeaderTemplate("<input type='checkbox' id='checkAll' /><label
for='checkAll'>Select </label>").Width(120);
col.Command(c => c.Custom("Remove").Click("remove")).Width(120);
}).DataSource(d => d.Ajax()
.Model(m => m.Id("Id"))
.Read(p => p.Url("/Customers/GetCustomerIndex").Type(HttpVerbs.Get)))
)
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save Users" class="btn btn-default" id="btnGroupInv2" style="color: rgb(8, 4, 36)" />
</div>
</div>
}
I have "SelectAll" header template for checking and unchecking for all check boxes.I am unable to post the unchecked values with id's on clicking submit button ?I spent many hours on this. Any Suggestions or any other methods would be grateful thanks
{
@(Html.Kendo().Grid(Model).Name("Usersgrid").Columns(col =>
{
col.Bound(i => i.Id).Hidden();
col.Bound(b => b.Email);
col.Bound(p => p.UserActive).ClientTemplate("<input type='checkbox'
name='checkedvalues' class='chkbx'
value='#= Id #' " + "# if (UserActive)
{ #" + "checked='checked'" + "# } #" + "/>" +
" <input type=\"hidden\" name=\"checkedvals\"
value=\"#=Id#\"/>")
.HeaderTemplate("<input type='checkbox' id='checkAll' /><label
for='checkAll'>Select </label>").Width(120);
col.Command(c => c.Custom("Remove").Click("remove")).Width(120);
}).DataSource(d => d.Ajax()
.Model(m => m.Id("Id"))
.Read(p => p.Url("/Customers/GetCustomerIndex").Type(HttpVerbs.Get)))
)
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save Users" class="btn btn-default" id="btnGroupInv2" style="color: rgb(8, 4, 36)" />
</div>
</div>
}
I have "SelectAll" header template for checking and unchecking for all check boxes.I am unable to post the unchecked values with id's on clicking submit button ?I spent many hours on this. Any Suggestions or any other methods would be grateful thanks