The control ensures that a column fits the visible client area when I click a cell. How can I avoid that?
The control automatically calls the EnsureVisibleColumn method when the user clicks a cell. The following sample shows how to avoid calling the EnsureVisibleColumn method when user clicks a cell: Private Sub Grid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) With Grid1 Dim c As Long, hit as Long Dim h As HITEM h = .ItemFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY, c, hit) If Not (h = 0) Then .
Related Questions
- How can I reset the OnMouseHover timer so that it will fire again without the mouse having to leave the client area of a control?
- The control ensures that a column fits the visible client area when I click a cell. How can I avoid that?
- How do I make the last column of a DataGrid fill the remaining client area?