I have tried to access CExtMDP::m_bMappingEnabledX
and CExtMDP::m_bMappingEnabledY
properties in the CExtGridWnd
class, but I could not access directly.
CExtGridDataProvider::public CObject, public CExtMDP_MappingAPI
<-- not CExtMDP
So I can’t access properties of CExtMDP class. Besides, I called OnGridQueryDataProvider().MappingEnableX()
and OnGridQueryDataProvider().MappingEnableY()
functions instead of direct access ,but the result is not changed.
Could you offer me sample code to get a pointer of the hidden cell?
CExtGridWnd wndMyGrid;
// grid setting ...... (column, style, ...)
wndMyGrid.AddRow(3);
wndMyGrid.RowHide(1); // hide second row
wndMyGrid.OnGridQueryDataProvider().MappingEnableY(false);
CExtGridCellString * pCell =
STATIC_DOWNCAST(
CExtGridCellString,
wndMyGrid.GridCellGet(
0,
1, // I want to get a pointer of the hidden cell. But still a third cell is returned.
0,
0,
RUNTIME_CLASS(CExtGridCellString)
)
);
CExtGridCellString * pCell =
STATIC_DOWNCAST(
CExtGridCellString,
wndMyGrid.GridCellGet(
0,
2, // it makes ASSERT error. (Invalid row number)
0,
0,
RUNTIME_CLASS(CExtGridCellString)
)
);
wndMyGrid.OnGridQueryDataProvider().MappingEnableY(true);