I'm new in C# and I have a problem with setting the value of a cell programmatically.
I've created a column and added it to the DataGridView:
DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
column.Name = "DeclaredBy";
column.HeaderText = "DeclaredBy";
TaskDataGridView.Columns.Add(column);
The column shows up correctly. But when I want to set a value in any cell of this column, nothing happens, the cell is still empty:
TaskDataGridView.Rows[i].Cells["DeclaredBy"].Value = "test";