Solved

Does the datagridview RowCount include the addnew row?

Posted on 2006-06-13
1
867 Views
Last Modified: 2009-12-16
Background:
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:
dgvDBF.Rows.RemoveAt(intRow)
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.

Cheers.
0
Comment
Question by:nebbles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 34

Accepted Solution

by:
Sancler earned 250 total points
ID: 16898656
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

Roger
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question