Problem with scrolling datagrid - lost focus if another object (button) in form

Sorry, I found it myself. But maybe it''ll help somebody else... The solution is to add following code to onScroll event: private void dataGrid1_Scroll(object sender, System.EventArgs e) { dataGrid1.Focus(); }

1 Reply

TO tomas February 2, 2004 10:02 AM UTC

Please help me with this: When scrolling datagrid with mousewheel and another object is on the form (f.e. button), datagrid lost focus when the selected cell is out of displayed area in datagrid - so the scrolling is disabled.

Loader.
Up arrow icon