public ActionResult DeleteRowPartial(int ID) { if (ID >= 0) { try { GridViewData.DeleteItem(ID); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(PartialView("_GridViewPartial", GridViewData.GridData)); }