ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Mouse Navigation

When the user clicks a non-current cell, the grid fires the BeforeRowColChange event. Unless this event is cancelled, the clicked cell becomes current and the grid subsequently fires the RowColChange event after any pending update operations have completed. The only exceptions to this are:

·      If the user clicks a cell in a column or split that has the AllowFocus property set to False, and the cell belongs to the current row, then the current cell does not change.

·      If the user clicks a cell in a column or split that has the AllowFocus property set to False, and the cell does not belong to the current row, then the current row changes, but the column with the focus retains it.

·      If the current cell has been modified, and the BeforeColUpdate event is canceled, then the current cell does not change.

·      If the current row has been modified, and the user clicks a cell in a different row, and the BeforeUpdate event is canceled, then the current cell does not change.

The user can also use the mouse to manipulate the grid's scroll bars, bringing cells that lie outside the grid's display area into view. The vertical scroll bar governs rows; the horizontal scroll bar governs columns. The HScrollBar property controls whether the horizontal scroll bars are displayed, while the VscrollBar property controls the vertical scroll bar.

Scrolling always occurs in discrete cell units; the user cannot scroll on a per-pixel basis in either direction.

Note that the scroll bars do not change the current cell. Therefore, the current cell may not always be visible.

To respond to vertical scrolling operations in code, use the FirstRowChange event. To respond to horizontal scrolling operations in code, use the LeftColChange event.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.