• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1159
  • Last Modified:

Why is the DisplayedRowCount wrong in DGV?

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
ddepuemd
Asked:
ddepuemd
  • 2
  • 2
1 Solution
 
Jorge PaulinoIT Pro/DeveloperCommented:

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
 
ddepuemdAuthor Commented:
Yes, I know that, but the form is showing all 49 rows in the grid and the displayed count is wrong.  Why?
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Have you don this way to include also the parcial rows ?

Me.DataGridView1.DisplayedRowCount(True)
0
 
ddepuemdAuthor Commented:
I found my error. .....
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now