问题
I have a DataGridView control inside the Panel. The size of the panel is fixed and AutoScroll is enabled. The problem is that after finishing editing a cell (by pressing Enter or clicking on another cell) the both scrolls of the panel (horizontal and vertical are reseted to start position). This is very inconvenient. How it can be fixed?
回答1:
Why you using DataGridView in Panel? DataGridView have own scrollbars. If you must use it in Panel, set AutoScroll to disabled and dock DataGridView inside.
来源:https://stackoverflow.com/questions/6140355/problem-with-datagridview-and-scroll-position