Changeset 2124 for trunk/sources
- Timestamp:
- 07/01/09 10:01:06 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs
r1901 r2124 51 51 // another C# app (HL2) have the same numeric value 52 52 dataGridView.DefaultCellStyle.Format = "r"; 53 54 //events for virtual mode of datagrid 55 this.dataGridView.VirtualMode = true; 56 this.dataGridView.CellValueNeeded += new DataGridViewCellValueEventHandler(dataGridView_CellValueNeeded); 53 57 } 54 58 … … 75 79 dataGridView.ColumnCount = columns; 76 80 dataGridView.RowCount = rows; 77 for (int i = 0; i < rows; i++) {78 for (int j = 0; j < columns; j++) {79 dataGridView.Rows[i].Cells[j].Value = Dataset.GetValue(i, j);80 dataGridView.Rows[i].HeaderCell.Value = i.ToString();81 }82 }81 //for (int i = 0; i < rows; i++) { 82 // for (int j = 0; j < columns; j++) { 83 // dataGridView.Rows[i].Cells[j].Value = Dataset.GetValue(i, j); 84 // dataGridView.Rows[i].HeaderCell.Value = i.ToString(); 85 // } 86 //} 83 87 for (int i = 0; i < columns; i++) { 84 88 dataGridView.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable; // SortMode has to be NotSortable to allow ColumnHeaderSelect … … 106 110 } 107 111 112 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 113 e.Value = Dataset.GetValue(e.RowIndex, e.ColumnIndex); 114 } 108 115 109 116 private void SetArrayElement(int row, int column, string element) {
Note: See TracChangeset
for help on using the changeset viewer.