winform datagridview 同步滚动

//首先添加 Scroll事件
//
同步滚动 private void dgYY_Scroll(object sender, ScrollEventArgs e) { if (this.dgFee.RowCount > 0) { dgFee.FirstDisplayedScrollingRowIndex = Math.Min(dgYY.FirstDisplayedScrollingRowIndex, this.dgFee.RowCount - 1); dgFee.HorizontalScrollingOffset = dgYY.HorizontalScrollingOffset; } } //同步滚动 private void dgFee_Scroll(object sender, ScrollEventArgs e) { if (this.dgYY.RowCount > 0) { dgYY.FirstDisplayedScrollingRowIndex = Math.Min(dgFee.FirstDisplayedScrollingRowIndex, this.dgYY.RowCount - 1); dgYY.HorizontalScrollingOffset = dgFee.HorizontalScrollingOffset; } }

 

winform datagridview 同步滚动

上一篇:echarts标题(title)配置


下一篇:在Windows上同步SVN代码库到备份SVN机器上