Answer the question
In order to leave comments, you need to log in
How to prevent dataGridView from scrolling with mouse wheel?
There is this code:
int k = 0;
...
void dataGridView1_MouseWheel(object sender, MouseEventArgs e)
{
if (e.Delta < 0 && k < 15) //если колесо мыши на себя
k++;
else
{
//если прокрутил на 15 строчек вниз, то дальше нельзя.
//Тут нужно запретить дальнейшую прокрутку грида.
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question