Objective Grid : PART II Programmer’s Guide : Chapter 16 Optimization
Chapter 16 Optimization
Grid Architecture Review
As you try to optimize the performance of your grid, it is useful to keep the Objective Grid architecture in mind.
The CGXGridParam class encapsulates all the data needed to persist a grid. It is commonly referred to as the Param object, which maintains attributes and objects being shared by several grid views of one document. It has pointers to the styles map with the grid-wide base styles, the properties object, the data object with the cell contents, the Undo/Redo list, selected ranges, and covered cells. By default, a CGXGridParam object is created in the initialization code for Objective Grid.
The CGXData class holds the grid’s data. An instance of this class is stored in the Param object. This object is not used for database bound grids, which do not actually store data values inside the grid. Additionally, formula grids use a specially-derived CGXData class, CGXFormulaSheet, to hold data used by the formula engine.
The CGXStyle class stores all the state information for a particular cell—including things like its value, its font, its background color, the type of border it has, etc. Each cell can have an individual style object (stored in the CGXData).
CGXFormulaSheet, CGXData, and CGXGridCore have some of the same methods. When you call CGXGridCore methods, validation and other processes take place. If you use CGXData methods when possible, you can avoid some processing.
Chapter 12, “Advanced Design Overview,” covers Objective Grid architecture in detail.