private static void DisplayDataGridView <T>(InputSet <T> set, DataGridView dataGrid) { ClearDataGridView(dataGrid); if (set.ColCount == 0) { return; } for (int i = 0; i < set.ColCount; i++) { dataGrid.Columns.Add(i.ToString(), set.ColNames[i]); } if (set.RowCount == 0) { return; } dataGrid.Rows.Add(set.RowCount); for (int i = 0; i < set.RowCount; i++) { dataGrid.Rows[i].HeaderCell.Value = set.RowNames[i]; for (int j = 0; j < set.ColCount; j++) { dataGrid.Rows[i].Cells[j].Value = set.Numbers[i, j]; } } }
public Data() { Q = new InputSet <float>(); R = new InputSet <float>(); }