I have datagridview that contains information from my database. But I need to add new rows with a button.
This error message appears:
Rows cannot be programmatically added to the datagridview's row collection when the control is data-bound
private void pictureBox1_Click(object sender, EventArgs e)
{
int rowId = dgvArticulos.Rows.Add(new DataGridViewRow());
}
I read many posts but they're using DataTable and it doesnt work for my case. Does anybody knows how to solve this issue?
Thanks in advance