<< Return to Main Index

< Return to Class Index

CGXODBCGrid::ConvertValueToString

virtual void ConvertValueToString(ROWCOL nCol, CString& sResult);

nCol

Specifies the column id.

sResult

Reference to a CString to receive the converted value.

Remarks

Called from OnLoadCellStyle to retrieve a string with the value for the ODBC field bound to the specified column. The string will be displayed in the grid.

The default implementation of this method converts all ODBC data types except AFX_RFX_BINARY and AFX_RFX_LONGBINARY. You may override this method if you want to convert the values for these data types, too.

Note: It should also be possible to convert the value for these special data types in a subclassed CGXControl. An example would be a CGXDbBitmapControl class, where you could convert an AFX_RFX_LONGBINARY field to a bitmap or only display a message box with a bitmap when the user double-clicks on a cell.

See Also

CGXBrowserGrid::OnLoadCellStyle CGXControl::Draw

CGXODBCGrid

Class Overview | Class Members