作用:
仿瀑布流,滚动DGV到最下面自动翻下一页。
源码:
[C#] 纯文本查看 复制代码 dSkinGridList1.MouseWheel+=new MouseEventHandler(dSkinGridList1_MouseWheel);
private void dSkinGridList1_MouseWheel(object sender, MouseEventArgs e)
{
if (e.Delta > 0)
{
if (dSkinGridList1.PageIndex < dSkinGridList1.PageCount)
{
dSkinGridList1.PageIndex ++;
}
}
if (e.Delta < 0)
{
if (dSkinGridList1.PageIndex > 0)
{
dSkinGridList1.PageIndex --;
}
}
}
|