Question

I have a situation where I am adding multiple User controls (each containintg datagridview control, buttons and radio buttons) in my flow layout Panel (.net 3.5 Winforms). The height of flow layout panel is lesser than grid.

The problem is when I scroll down the the Flowlayout panel vertical scroll and select a cell in the grid the focus moves up at random to a cell, selecting all cells between those two positions.

Suggestions please ?

Thanks!

Était-ce utile?

La solution

I think you must be having the same problem as explained in the following URLs:

Why does clicking in a text box cause an AutoScroll panel to scroll back to the top?

http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/445af1e5-0f8d-4e4e-ba97-bc6dc72b5c74/

If so, overriding ScrollToControl as explained in the above URLs can help fix the issue.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top