<< Return to Main Index

< Return to Class Index

CGXWrappedGridCore::SetPatternMap

virtual void SetPatternMap(CGXCoveredCellPatternMap* map, BOOL bMustDelete = TRUE);

map

Specifies the map to be used.

bMustDelete

Specifies whether the map should be deleted when the grid gets deleted.

Remarks

Allows you to specify a pointer to the map which is a key utility class that maps logical hierarchical cells to absolute grid cells and vice versa.

A default map will be created automatically whenever the corresponding grid is getting initialized. You will have to call SetPatternMap supplying a custom map only when you have to share maps between multiple grids.

This is because, when you have to share wrapped grid properties between children it’s necessary that you share the same map between the children. In such cases, in order that no child grid deletes this map when the grid itself is deleted, you will have to call SetPatternMap with bMustDelete set to FALSE.

Always call SetPatternMap after initializing (calling OnInitialUpdate on) the grid. The existing map will be deleted automatically if necessary.

You can access the underlying reference to the map directly via the public member m_patternMap.

CGXWrappedGridCore

Class Overview | Class Members