I have a DataGridView in my application. When I logged in, the records will be displayed in the grid. It works fine. But when I logged out and logged in again, this arror appears, "No row can be added to a DataGridView control that does not have columns. Columns must be added first.". How could that be happen while I created / added 4 columns manually when I created the DataGridView in my GUI?
No row can be added to a DataGridView control that does not have columns.
Collapse
X
-
Hi mylixes,
It's difficult to tell without any code sample but somehow either the columns aren't being added, or they're being removed before the rows are added.
If you're adding columns manually, make sure AutoGenerateCol umns is set to false.
If you still experience problems, try posting a small code sample that may help us to diagnose the issue.
Comment