private void TaskGrid_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e) { //get the object that triggered the change! object o = TaskGrid.ItemContainerGenerator.ItemFromContainer(e.Row); //if we aren't editting a task, add it to the list of changes to push to the Database! if (TasksList.Contains(o) && Editting == false) { Task task = (o as Task).Clone(); var taskmngr = new TaskManager(); if (taskmngr.TaskEditable(task.ID, LoggedInUser.GetUserHash())) { taskmngr.ChangeTasks(task); } } }