/// <summary> /// Updates the data source of the data grid view with the current known failure mechanism section results. /// </summary> private void UpdateDataGridViewDataSource() { DataGridViewControl.EndEdit(); RemoveSectionResultRowEvents(); sectionResultRows = failureMechanismSectionResults .Select(CreateFailureMechanismSectionResultRow) .Where(sr => sr != null) .ToList(); DataGridViewControl.SetDataSource(sectionResultRows); sectionResultRows.ForEachElementDo(row => { row.RowUpdated += RowUpdated; row.RowUpdateDone += RowUpdateDone; }); }