Data-bound DataGridView creates bogus empty rows

J

JustinD30324

Hello. I have a DataGridView that is bound to a DataTable. If the user
types in values for all the columns for the first row, then clicks
into a column in the second row (empty), and then clicks back into the
first row he just typed, then an empty row is added to the
DataGridView. I'm guessing that somehow the AddRow function is being
called when the user clicks in and out of the empty row. I don't want
this to happen. A new row should only be added to the DataGridView if
the user types in valid values for all the columns. Does anyone know
how to fix this? Thanks.

Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top