datagridview dgv is populated from datatable dt which is populated from a table in the database.
The database table has fields such as:
CustID int not null
fieldNo int not null
field3 varchar(10) null,
On the dgv, I can add a new record as it allows adding a new row.
The field FieldNo is hidden on the dgv. When adding a new row, obviously the user is not adding a fieldNo. As a result, the dgv gives an error that the field does not allow null.
What is the way to solve this please?
Note that it has to have an empty value because once the user has finished adding a new row, then the database stored proc will take care of choosing the correct fieldNo for the table during the insert.
Any thoughts please?