C# DevExpress之GridView同步滚动条记录方法

两个GridView:viewBarcodeSpecimens,viewBarcodePatient,隐藏viewBarcodeSpecimens的VertScrollVisbility = Never

激活viewBarcodePatient的事件TopRowChanged,原理是同步两个Grid的的TopRowIndex位置即可。

private void viewBarcodePatient_TopRowChanged(object sender, EventArgs e)
{
    viewBarcodeSpecimens.TopRowIndex = (sender as GridView).TopRowIndex;
}

  

转载于:https://www.cnblogs.com/jonathan236/p/3740971.html

你可能感兴趣的:(c#)