public ActionResult ClientRowTemplate_Delete(string id) { var customer = SessionCustomerRepository.One(c => c.CustomerID == id); if (customer != null) { SessionCustomerRepository.Delete(customer); } return(View(new GridModel(SessionCustomerRepository.All()))); }
public ActionResult ServerRowTemplate_Delete(string id) { var customer = SessionCustomerRepository.One(c => c.CustomerID == id); if (customer != null) { SessionCustomerRepository.Delete(customer); } return(RedirectToAction("ServerRowTemplate", this.GridRouteValues())); }
public ActionResult _DeleteAutoColumnsEditing(string id) { EditableCustomer customer = SessionCustomerRepository.One(p => p.CustomerID == id); if (customer != null) { //Delete the record SessionCustomerRepository.Delete(customer); } //Rebind the grid return(View(new GridModel(SessionCustomerRepository.All()))); }