two TMSFMXGrids: synchronize scrolling

I have two TMSFMXGrids and I need to synchronize if one of both is scrolled down/up and scroll the second one with the same number of pixels. How can I achieve this? 

Best regards, Philipp

Hi, 


There is currently no scrolling event published, we'll look into this. As a workaround, you can use a timer that synchronizes the grid. If you want to synchronize the Top/Left col and row position you can use the OnTopLeftChanged event, but this won't be pixel based.



procedure TForm1.Timer1Timer(Sender: TObject);
begin
  TMSFMXGrid2.GetHorizontalScrollBar.Value := TMSFMXGrid1.GetHorizontalScrollBar.Value;
  TMSFMXGrid2.GetVerticalScrollBar.Value := TMSFMXGrid1.GetVerticalScrollBar.Value;
end;