DataGridView Cell Displayed Property

Joined
Sep 3, 2008
Messages
19
Programming Experience
1-3
In the scroll event of the datagridview event, I have a code that checks if the cell in the second column of the second row is displayed. Here is the code:

If datagridview1.item(1,1).displayed = true then

..............................
..............................

else

...............................
.............................

end if


The above code doesn't work because the displayed property of the datagridviewcell always return false where ever I move the scroll bar. This property only changes when I select a cell and use the cursor keys to move to the very bottom or to the very top of the datagridview. How can I check if the cell of a datagridview is displayed on the screen while scrolling and using cursor keys?


Thanks.
 
The Displayed property reliably works for me no matter how I navigate the grid, not sure why yours don't...
 
Back
Top