Does the datagridview RowCount include the addnew row?

VS 2005
I'm using a datagridview to store some data which I populated through a OdbcDataReader.  I loop through the rows and perform a delete (on certain rows) using:
The last record reports the following error:
      Uncommitted new row cannot be deleted.

The only reason I can figure why I'm getting the error is if the Add New Row is included in the datagridview rowcount property.  Since I can't base code on a hunch I'm looking for some confirmation.

Who is Participating?
SanclerConnect With a Mentor Commented:
Yes, the dgv's RowCount (or its Rows.Count) does include the row in which a new entry can be made - the "Add New Row" - if such a row exists: that is, if AllowUserToAddRows = True

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.