PRB: Grid Does Not Respond to the Click or Dblclick EventsLast reviewed: January 9, 1997Article ID: Q128075 |
The information in this article applies to:
SYMPTOMSThe methods associated with the Click or DblClick events of a grid are not executed when a user clicks any element of the Grid. It seems events are not triggered when the grid is filled with data.
CAUSEThis behavior is by design. A grid object is a container of columns. Columns in turn contain controls. Methods defined in a container are not inherited in the container hierarchy. For example, the code you include in the Click event of a form is not executed when you click a command button. When a grid is filled with data and you click a cell in the grid, the control, a text box by default, receives the Click event. The grid receives the click event in areas that contain no data.
WORKAROUNDUse the Click event procedure of the control to trap for a mouse click in a filled record. Another way to trap for a mouse click anywhere on the grid is to cover the grid with a shape, and place code in the Click event of the shape. Make sure the Backstyle property of the shape is set to 0 for transparent and that the shape is on top. If the shape is not on top of the grid, you can place it there by selecting "Bring to Front" on the layout toolbar when the shape is selected.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
|
KBCategory: kbtool kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |