DataGridView always displaying a Vertical scrollbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have managed to always display a vertical scrollbar in a DataGridView by
subclassing the DataGridView and handling the
VerticalScrollBar.VisibleChanged event. The problem is that the horizonal
scrollbar appearance is based on the visible DataGridView view without the
vertical scrollbar. So if the user does a resize, about half of the last
column gets covered before the horizontal scrollbar appears.

It seems that DisplayRectangle tracks the correct visible size but I can't
find a way to change it that will effect the horizontal scrollbar.
Overriding DisplayRectangle did not work.

Thanks.
 
Back
Top