Solved

Why is the DisplayedRowCount wrong in DGV?

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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