Column cannot be added because its CellType property is null.

Robert DeMaree 41 Reputation points

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,471 questions
{count} votes