hallo,
ich habe dataGridView8, mit dem Kopf "dataGridView8 laden" wird dataGridView8 gefüllt.
C#-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| for (int i = 0; i < dataGridView7.Rows.Count - 1; i++) { dataGridView8.Rows.Add(dataGridView7.Rows[i].Cells[0].Value.ToString(), dataGridView7.Rows[i].Cells[2].Value.ToString(), dataGridView7.Rows[i].Cells[1].Value.ToString(), dataGridView7.Rows[i].Cells[7].Value.ToString(), dataGridView7.Rows[i].Cells[6].Value.ToString(), dataGridView7.Rows[i].Cells[8].Value.ToString(), dataGridView7.Rows[i].Cells[9].Value.ToString(), dataGridView7.Rows[i].Cells[10].Value.ToString()); } |
Wenn ich vor der schleife...
C#-Quelltext
1:
| dataGridView8.Items.Clear() |
... setze wird Items rot unterstrichen.
Fehler
1: 2:
| Fehler CS1061 "DataGridView" enthält keine Definition für "Items", und es konnte keine Items-Erweiterungsmethode gefunden werden, die ein erstes Argument vom Typ "DataGridView" akzeptiert (möglicherweise fehlt eine using-Direktive oder ein Assemblyverweis). |
Moderiert von Th69: Beitragsformatierung überarbeitet.