Solved

Why is the DisplayedRowCount wrong in DGV?

Posted on 2009-04-07
4
1,098 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 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