Solved

Why is the DisplayedRowCount wrong in DGV?

Posted on 2009-04-07
4
1,087 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
[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
  • 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 250 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net winforms sizing/resolution? 4 57
MailAddress in vb 4 36
VB.NET String Settings and Temp Folder Question 3 75
visual studio vb.net windows onkeyup 2 30
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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