I have a DataGrid control on a form and I'm binding it to an ArrayList that is populated dynamically as the user scrolls. The array list is pre-populated with blank records equal in number to the number of records in the DB. As the user scrolls,
if they stop in a place where there are blank records I populate that data from the DB. I'm using the VisibleRowCount and VertScrollBar.Value properties to determine where I am in the DataGrid.
The problem is that if I scroll to the bottom of the control then maximize the control it's resize event fires, the VertScrollBar is redrawn proportionally to the number of records, but the Value and VisibleRowCount remain unchanged. If I then grab
and scroll the scroll bar up then back down to the bottom, the Value and VisibleRowCount update correctly. Is there a way for me to get these values some other way or to force the scroll bar to refresh/update manually?
View Complete Post