We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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.

Live Chat Icon For mobile
Up arrow icon