Ejemplo n.º 1
0
        /// <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;
            });
        }
 protected override void SetDataSource()
 {
     dataGridViewControl.SetDataSource(calculations?.Select(CreateNewRow).ToArray());
 }
 protected override void SetDataSource()
 {
     dataGridViewControl.SetDataSource(calculations?.Select(calc => new DuneLocationCalculationRow(calc)).ToArray());
 }