Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Grid User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

16.2 Initializing Formula Grids

16.2.1 Using Formula Sheet Methods

Speed can be a problem in initializing large formula grids. If you are using the grid with the formula engine, the fastest way to fill the grid is to use CGXFormulaSheet methods instead of CGXGridCore methods to do the assignments. If you call SetNumberRowCol() and SetTextRowCol() directly, the speed improvements will be enormous compared to calling SetValueRange() or SetExpressionRowCol() for each cell. Be aware that cells are not checked for read-only status, cell objects are not notified, and no Undo information is created. The code for this sample is located at <stingray-installdir>\Samples\Grid\General\Formula.

16.2.1.1 SetFormulaRowCol()

16.2.1.2 SetNumberRowCol() and SetTextRowCol()

16.2.2 Copying Cells

Using a combination of SetExpressionRowCol() and CopyCells() also provides fast initialization. Here is an example of this technique:


If this is a standard initialization, using an OGF file might be a way to quickly load it. (OGF is the file format for formula grids, while OGL is the file format for a standard grid.)



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.