两个GridView:viewBarcodeSpecimens,viewBarcodePatient,隐藏viewBarcodeSpecimens的VertScrollVisbility = Never
激活viewBarcodePatient的事件TopRowChanged,原理是同步两个Grid的的TopRowIndex位置即可。
private void viewBarcodePatient_TopRowChanged(object sender, EventArgs e) { viewBarcodeSpecimens.TopRowIndex = (sender as GridView).TopRowIndex; }