Добавление строк в datagridview с существующими столбцами
dataGridView1.Rows[0].Cells[0].Value = texstudentID.Text; dataGridView1.Rows[0].Cells[1].Value = texstudentName.Text; dataGridView1.Rows[0].Cells[2].Value = texstudentFamily.Text; dataGridView1.Rows[0].Cells[3].Value = texstudentNationID.Text; dataGridView1.Rows[0].Cells[4].Value = texstudentField.Text; dataGridView1.Rows[0].Cells[5].Value = openFileDialog1.FileName; dataGridView1.Rows[0].Cells[6].Value = texstudentNationID.Text; dataGridView1.Rows.Add();
я хочу добавить строку после последней строки в dataGridView1.
но я сталкиваюсь с этой ошибкой :
Строки не могут быть программно добавлены в коллекцию строк DataGridView, если элемент управления привязан к данным.
плиз, помогите мне!