| | | | Browse by category |
Article ID: 532
Last updated: 16 Apr, 2018
Problem
How can I fill the choice list of a combo box depending on a value in another cell?
Cause
Action
You should override GetStyleRowCol( ) and determine the choice list at runtime.
Example:
BOOL CMyGridyView::GetStyleRowCol(ROWCOL nRow, ROWCOL nCol, CGXStyle& style, GXModifyType mt, int nType) { |
|||
if (!base_class::GetStyleRowCol(nRow, nCol, style, mt, nType)) | |||
return FALSE; | |||
if (IsPrinting() || nRow == 0 || nType == -1) | |||
return TRUE; | |||
// you may also set this in your OnInitialUpdate routine! m_bRefreshOnSetCurrentCell = TRUE; // Check if this is the current cell |
|||
// execute a query which determines the choice only // for the current cell. For inactive cells, the // choice list has no meaning. // Current value of cell is available by |
|||
}
return TRUE; |
|||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 532
Last updated: 16 Apr, 2018
Revision: 3
Views: 1914
Posted: 23 Jan, 2001 by
Meltreger B.
Updated: 16 Apr, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)