How to link the scrool bars of two grinds on 1 form?
I have 2 data grids on 1 form and i want to link scroll of both the grids . Means if i scroll one grid then automatically the other grid scroll bar also scrolls
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Aug 22, 2009, 10:30 AM EDT
dont forget to mark "Do you like answer" it will give me some credits :)
I have taken here two dataGridView When i Scroll dataGridView1 it will also Scroll DataGridView2 's Scrollbar :)
private void dataGridView1_Scroll(object sender, ScrollEventArgs e)
{
//Check if it is Vertical Scroll
if (e.ScrollOrientation == ScrollOrientation.VerticalScroll)
{
// Set Scrolling Row Index to Scroll Event new Value
dataGridView2.FirstDisplayedScrollingRowIndex = e.NewValue;
}
//You Will Get What you want
}