Some info up front.
Have a panel(pnlMain) containing a datagridview and an other panel (pnlFilter).
pnlFilter contains textboxes to filter the data in the datagridview.
Also the width of the textboxes are synchronized with the width of the colums of the datagridview.
To keep the textboxes lined up with the column I make the width of datagridview the same as the total width of the columns.
By doing so the vertical scroll bar of the datagridview can move out of view.
To prevent that users have to move the horizontal scrollbar to get to the vertical scrollbar. I placed a vertical scrollbar control.
I managed to set it to the settings of the vertical scrollbar of the datagrid view.
Also I can move the vscrollbar control when the scrollwheel is used on the datagridview.
But I can't get the datagridview to scroll when using the vscrollbar control.
I know that you can use FirstDisplayedScrollingRowIndex to scroll to a row, but I can't use the value of the scrollbar control for it because it's telling my that its out of range.
All other ideas on solving this problem is most welcome.
Thx in advance.
Greetings
Ernst Jan
Have a panel(pnlMain) containing a datagridview and an other panel (pnlFilter).
pnlFilter contains textboxes to filter the data in the datagridview.
Also the width of the textboxes are synchronized with the width of the colums of the datagridview.
To keep the textboxes lined up with the column I make the width of datagridview the same as the total width of the columns.
By doing so the vertical scroll bar of the datagridview can move out of view.
To prevent that users have to move the horizontal scrollbar to get to the vertical scrollbar. I placed a vertical scrollbar control.
I managed to set it to the settings of the vertical scrollbar of the datagrid view.
Also I can move the vscrollbar control when the scrollwheel is used on the datagridview.
But I can't get the datagridview to scroll when using the vscrollbar control.
I know that you can use FirstDisplayedScrollingRowIndex to scroll to a row, but I can't use the value of the scrollbar control for it because it's telling my that its out of range.
All other ideas on solving this problem is most welcome.
Thx in advance.
Greetings
Ernst Jan