protected void EmployeesGrid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { int rowindex = EmployeesGrid.FindVisibleIndexByKeyValue(e.Keys[EmployeesGrid.KeyFieldName]); ASPxGridView grid = (ASPxGridView)sender; var id = grid.GetRowValues(rowindex, "ID").ToString(); db.D_Grup(Convert.ToInt32(id)); e.Cancel = true; EmployeesGrid.CancelEdit(); Update(); }