Is there an event that I can use to trap when the user clicks on the Up or Down buttons in the grid's vertical scrollbar? I'm mostly interested in up.
I'm implementing batching with a datasource and the grid. I can easily use the OffEnd event of my datasource to populate more rows when scrolling down. However, it's possible that the batch of data that is initially retrieved doesn't actually start with the first record in the query. The user may have entered a starting filter value.
If this occured, I still need to be able to have the user scroll up in the grid while behind the scenes, I fetch more data. I've got this working if scrolling using the keyboard. I just need to know that the user clicked on the scrollbar up arrow so I can perform the same action.
Thanks,
JL
There are no events specifically raised when the user clicks on the arrows of the scrollbar. The closest corresponding events are the BeforeRowRegionScroll and AfterRowRegionScroll events, which are raised on any vertical scroll action.
In the BeforeRowRegionScroll event, you get access to both e.OldState and e.NewState, both of which are RowScrollRegion objects. You can compare the ScrollPosition property of each to determine whether you scrolled up or scrolled down.
Thanks Vince.
Unfortunately, if the first row of the grid is at the top of the viewport, neither the BeforeRowRegionScroll nor AfterRowRegionScroll methods are fired when the up button is clicked.
Can you suggest any other way to accomplish what I need?