I have a problem in creating a datagrid column in c#
here is my code.
DataGridViewColumn newCol = new DataGridViewColumn();
newCol.HeaderText = txtHeader.Text;
newCol.Width = Convert.ToInt16(cboWidth.Text);
dgWorkArea.Columns.Add(newCol);
On my above code snippet, the error's came when trying to call the fourth (4th) line code. Here is the error.
At least one of the datagridview control's columns has no cell template
Can anyone help me on how can I create a simple column in datagrid.