PRB: DataGrid Control Does Not Return Contents of Edited Cell
Symptoms
The Microsoft DataGrid Control 6.0 (OLEDB) does not return the contents ofan edited cell.
Using the CellText properties of the Column object returns the originalvalue of the text currently in the cell and not the text the user hasedited. This behavior differs from the Data Bound Grid Control that returnsthe value of the user-edited text.
This scenario may be problematic for a developer who would like to validatethe contents of the cell before the contents are placed in the recordset.
Resolution
The DataGrid control provides a window handle to the cell being edited.Using this handle and the GetWindowText API, the developer can get thecontents of the edited cell before the contents are saved in the recordset.
