المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Number of DataGridViewRow's that have Visible == true



C# Programming
05-28-2009, 08:01 PM
I'm implementing a filter, and need to indicate if the filters applied are hiding one or more row, or if all the rows are visible.

My first thought was to use DataGridView.DisplayedRowCount(), but it returns the number of rows that are actually shown on the screen. If there are enough rows to trigger a vertical scroll this isn't the same because rows that are off the top/bottom of the list are not counted.

Is there another method/property I'm not seeing, or will I have to iterate over the entire Rows collection?

It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies