I'm using ASP.NET MVC 4 with EF.
I want to add CheckBox at the end of every row.(this checkbox is not in my Model)
grid.Column("Verified", format: @<text><input name="cbVerify" type="checkbox" value="@??"/></text>)
...
@Html.ActionLink("Verified", "Verified", "Items")
And the selected rows I want to update all the selected records
[HttpPost]
public ActionResult Edit(items items)
{
if (ModelState.IsValid)
{
db.items.Attach(items);
items.status = 4 ; //verified
items.date_verif = Datetime.Now;
db.ObjectStateManager.ChangeObjectState(items, EntityState.Modified);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(items);
}
public ActionResult Verified()
{
//var req = Request[""];??
foreach(// selected rows)
{
//Edit(items); ?
}
return RedirectToAction("Index");
}
Q: How can I update several selected rows from a button ?