Scrolling Two Datagrids Simultaneously
-
Hi, I have two datagrids on a WinForm. I want to keep them synchronized so that when the user scrolls one of them, I can programmatically scroll the other one an equal amount. The datagrid is new to me. How can I do that? Royce
If you had searched for answers to your problem first, you may have run across http://www.codeproject.com/script/comments/forums.asp?msg=911474&forumid=1649#xx911474xx[^], which describes the solution to what you're searching for. The fact that this is for a
RichTextBox
doesn't matter; the same solution works for practically all scrollable controls so long as the controls that they encapsulate handle the standard scrolling messages. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]