Column cannot be added because its CellType property is null.

Robert DeMaree 111 Reputation points
2021-09-24T07:37:43.087+00:00

Since I can't add my question to existing forums, that discuss the same subject, I thought that I'd duplicate an existing topic--to keep the answers coming.

So, am I to understand that this error is caused because it doesn't know what kind of data will be populating the cell?

Can I tell it what kind of data will be populating the cell? Oh wait, it's a READ-ONLY field.

So, the property that is complaining about NOT being populated--is READ-ONLY, and not permitted to BE populated.

Is that pretty much it--in a nutshell?

I've seen the responses about CELL TEMPLATE and all--but, what if this is a NEW DataGridView, and there are NO templates available?

(I assume there MUST be a way around this catch-22 situation.)

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,906 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.