C#Winform实现拉动滚动条时dataGridView项也滚动
这样做:
/// <summary>
/// 滚动条滚动事件
/// </summary>
private void scrollBar_Scroll(object sender, ScrollEventArgs e)
{
if (e.NewValue>=rowNo)//若当前值不小于行号,则不执行后面代码
{
return;
}
dataGridView.FirstDisplayedScrollingRowIndex = e.NewValue;
}
最后
以上就是无私书包最近收集整理的关于C#Winform实现拉动滚动条时dataGridView项也滚动的全部内容,更多相关C#Winform实现拉动滚动条时dataGridView项也滚动内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复