Gokhan
Gokhan

Reputation: 497

Move datagridview scroll bar by pressing button c#

In my WinForm project in c#,I have DataGridview that has 120 columns so this needs scrolling. But i want user press button and displays last column or specific column directly for convenience.

I do not want to add scroll control if possible, i want to handle it on "Datagridview scroll bar".

Is there any solution for that?

I added image for detail explaination.

Thanx in advance. enter image description here

Upvotes: 0

Views: 459

Answers (1)

Serg
Serg

Reputation: 4666

Just set DataGridView.FirstDisplayedScrollingColumnIndex & DataGridView.FirstDisplayedScrollingRowIndex to desired row and column indexes to display cell you want.

Upvotes: 2

Related Questions