Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Why is the DisplayedRowCount wrong in DGV?

Posted on 2009-04-07
4
Medium Priority
?
1,140 Views
Last Modified: 2012-06-27
I have DGV that is actually displaying 49 rows on the form.  I have reduced the height of each row in order to display them all.  However, when I get the value from DisplayedRowCount, it says there are 32.  Does anyone know why they are different and how do I fix it?
0
Comment
Question by:ddepuemd
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24089231

DisplayedRowCount  shows only the visible rows and not all the rows. If you want to get the number of rows in the datagridview you can use:
Me.DataGridView1.RowCount
0
 

Author Comment

by:ddepuemd
ID: 24089276
Yes, I know that, but the form is showing all 49 rows in the grid and the displayed count is wrong.  Why?
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 1000 total points
ID: 24089287
Have you don this way to include also the parcial rows ?

Me.DataGridView1.DisplayedRowCount(True)
0
 

Author Comment

by:ddepuemd
ID: 24089957
I found my error. .....
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

972 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