| | | | Browse by category |
Article ID: 335
Last updated: 07 Jun, 2018
Problem
How can I insert unbound columns where I want to display some additional info based on existing columns?
Cause
Action
You can insert columns with
InsertCols(3, 1); |
and override OnLoadCellStyle(). In OnLoadCellStyle() you can determine the values of the neighboring columns with GetValueRowCol(nRow, nCol).
Example:
BOOL CDaoqueryView::OnLoadCellStyle(ROWCOL nRow, ROWCOL nCol, CGXStyle& style, LPCTSTR pszExistingValue) { |
|||
// Is this the new column for the expression? if (nCol == 3) { |
|||
double val1 = GetValueRowCol(nRow, 1); double val2 = GetValueRowCol(nRow, 2); // Compute value // Don't let the user change return TRUE; |
|||
}
// Let the CGXDAOGrid read all return CGXDaoRecordView::OnLoadCellStyle(nRow, nCol, style, pszExistingValue); |
|||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 335
Last updated: 07 Jun, 2018
Revision: 3
Views: 2058
Posted: 24 Jan, 2001 by
Meltreger B.
Updated: 07 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)