I'm trying to override scroll functionality on DatagridView. (DGV with fixed RowCount which on scroll request refresh it self with new "scrolled" values instead of scrolling down to next values)
And I need to react myself to event and disable DatagridView to react to that event (disable it to scroll).
Something like:
protected override void OnScroll(ScrollEventArgs e)
{
ProcessScroll(e);
//Distable DGV processing scroll request
//base.OnScroll(e);
}
However this event occurs after scrolling is done. And for instance FirstDisplayedScrollingRowIndex in this point have new value after scroll.
So please can does anyone know how to react to this event before it makes any changes, and disable it to make any changes ?
I cant just catch mouse wheel event, or detect presed key, because you can scroll through DatagridView while you selecting cell by mouse.
Thank you