HOWTO: Determine the Contents of a Cell in a DBGrid ControlLast reviewed: September 25, 1997Article ID: Q149094 |
The information in this article applies to:
SUMMARYThis article shows how to determine the contents of a selected cell in a DBGrid control.
MORE INFORMATIONThe DBGrid control allows you to display the contents of a recordset or a table. With this method, you can take the data from a cell in the MouseUp event of the DBGrid control. This example uses a DBGrid control bound to Data control. The Data control uses the BIBLIO.MDB database for information. In the MouseUp event of the DBGrid control, the column and row positions of the cell are assigned to an integer variable. A bookmark is then set using the row position. Executing the CellValue method on the Columns collection of the DBGrid control determines the contents of the cell. Those contents then appear on a TextBox control.
Sample Code
Keywords : PrgCtrlsCus VB4ALL VB4WIN vb5all vb5howto Version : WINDOWS:4.0 5.0 Platform : NT WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |