pcf108 Posted October 22, 2003 Posted October 22, 2003 I have a problem when I'm scrolling a datagrid and the cell moves out of the current view of the grid, the grid loses focus and the control with next tab index is focused. This then makes the grid no longer scrollable with the wheel because it is not focused any longer. Any suggestions on making the focus stay on the grid even when the current row/cell is not in view so it can be scrolled by it's entirety with the mouse wheel? Quote
*Experts* jfackler Posted October 22, 2003 *Experts* Posted October 22, 2003 (edited) If you capture the total number of rows as below: Dim numRows as Integer = Me.BindingContext(dataGridDetails.DataSource, dataGridDetails.DataMember).Count; can you then compare the current selected row to the count and keep focus? Jon Edited October 22, 2003 by jfackler Quote
pwbriggs23 Posted May 13, 2004 Posted May 13, 2004 Hey did you ever figure this out? I am getting the same problem. Quote
BMS5819 Posted June 18, 2004 Posted June 18, 2004 Datagrid Loses Focus When Wheel Scrolls This worked for me: Private Sub DataGrid1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseWheel DataGrid1.Focus() End Sub Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.